What are the Differences Between "php artisan dump-autoload" and "composer dump-autoload"?

Naing Lin Aung picture Naing Lin Aung · Nov 28, 2013 · Viewed 211k times · Source

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?

Answer

Antonio Carlos Ribeiro picture Antonio Carlos Ribeiro · Nov 28, 2013

Laravel's Autoload is a bit different:

1) It will in fact use Composer for some stuff

2) It will call Composer with the optimize flag

3) It will 'recompile' loads of files creating the huge bootstrap/compiled.php

4) And also will find all of your Workbench packages and composer dump-autoload them, one by one.