What are the Differences Between "php artisan dump-autoload" and "composer dump-autoload"?
Laravel's
Autoload
is a bit different:
It will in fact use
Composer
for somestuff
It will call
Composer
with the optimizeflag
It will '
recompile
' loads of files creating the hugebootstrap/compiled.php
And also will find all of your Workbench packages and
composer dump-autoload
them, one by one.
php artisan dump-autoload
was deprecated on Laravel 5, so you need to use composer dump-autoload
composer dump-autoload
PATH vendor/composer/autoload_classmap.php
Composer dump-autoload
won’t download a thing.- It just regenerates the list of all classes that need to be included in the project (
autoload_classmap.php
). - Ideal for when you have a new class inside your project.
autoload_classmap.php
also includes theproviders
inconfig/app.php
php artisan dump-autoload
- It will call
Composer
with the optimize flag - It will '
recompile
' loads of files creating the hugebootstrap/compiled.php