Comparison of Artisan in Laravel 4 and 5

Posted on 5 February 2015

Below is a side by side comparison of the artisan commands available between Laravel 4 and 5.

Here's a few major changes (note that this is not an exhaustive list):


The default namespace is App, but you can change it to anything you want with this command. Just type php artisan app:name Your\App\Name in the console and it will update all the files with the new namespace, including the psr-4 autoloader in your composer.json file.


This is pretty straightforward. config:cache compiles your config files into one single file in storage/framework/config.php. config:clear removes this file.


This command is a welcome addition in Laravel 5. It replaces the something:make format of Laravel 4, which allows all the new make commands to be neatly grouped together. command:make and controller:make have been replaced by make:console and make:controller respectively.


This is another great feature in Laravel 5 for those who haven't yet used the Queue component. Simply run this command and change your queue driver to database in config/queue.php. Then you can start queuing your tasks without touching beanstalkd or redis or a third-party service. It's a great option for someone just getting started with queues.


This caches your routes into a single file in storage/framework/routes.php. This is especially useful if you're using route annotations.


I keep repeating myself, but this is yet another great addition to Laravel 5. Before, you had to run a bunch of separate cron jobs to perform multiple tasks in the background. Now, all you have to do run a single cron job that calls schedule:run. You then add your tasks to app/Console/Kernel.php. More on this in the docs.


This single command in Laravel 5 replaces the asset:publish and view:publish commands used to publish a package's assets.

There's a lot more going in with the make command in Laravel 5. Check out all the new commands under the make group and read the docs.