Skip to main content

Composer: All You Need To Know

Premium
5 min read

Laravel is a framework, but it's also a PHP package, installable by the composer package manager when you run the command composer create-project laravel/laravel. Let's explore the syntax options and other composer-related topics.


"composer install" VS "composer require"

A quick start answering this common question.

When running the composer install command, composer installs every package in the composer.json file list.

The composer require package/name is similar but does 2-in-1. This command installs a package to a project and adds it to a composer.json file required list.


composer.json VS composer.lock: install VS update

In composer.json, you specify what...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (36 h 00 min)

You also get:

61 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Francisco Ferreira Roque Júnior avatar
Francisco Ferreira Roque Júnior

Thanks Polivas, this lesson helped me a lot.

andywong31 avatar

im not sure what you meant by: "Some packages, like Laravel Debugbar or Laravel Breeze, aren't needed on production servers."

but i will be using Laravel Breeze in production.

Nerijus avatar

When you install breeze you publish files once and that's it, that's the only use you will ever do of breeze as from a package

andywong31 avatar

your comment got cut out

Nerijus avatar

I hate this comment system...

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.