I am pretty new to Laravel 4 and Composer. While I do Laravel 4 tutorials, I couldn't understand the difference between those two commands; php artisan dump-autoload and composer dump-autoload What's the difference between them?
191
votes
3 Answers
173
votes
80
votes
39
votes
composer dump-autoload
PATH vendor/composer/autoload_classmap.php
Composer dump-autoloadwon’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.phpalso includes theprovidersinconfig/app.php
php artisan dump-autoload
- It will call
Composerwith the optimize flag - It will '
recompile' loads of files creating the hugebootstrap/compiled.php
php artisan dump-autoloadis not included in L5 - Jimmy Obonyo Abor