Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

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? (29 h 14 min)

You also get:

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

Already a member? Login here

Comments & Discussion

FF
Francisco Ferreira Roque Júnior ✓ Link copied!

Thanks Polivas, this lesson helped me a lot.

A
andywong31 ✓ Link copied!

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.

N
Nerijus ✓ Link copied!

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

A
andywong31 ✓ Link copied!

your comment got cut out

N
Nerijus ✓ Link copied!

I hate this comment system...