Artisan Cheat Sheet

Displays help

php artisan --help OR -h  

Do not output any message

php artisan --quiet OR -q  

Display this application version

php artisan --version OR -V  

Do not ask any interactive question

php artisan --no-interaction OR -n  

Force ANSI output

php artisan --ansi  

Disable ANSI output

php artisan --no-ansi  

The environment the command should run under

php artisan --env  

Increase the verbosity of messages:
1 for normal output,
2 for more verbose output and
3 for debug

php artisan -v|vv|vvv  

Remove the compiled class file

php artisan clear-compiled  

Put the application into maintenance mode

php artisan down  

Display the current framework environment

php artisan env  

Displays help for a command

php artisan help  

Lists commands

php artisan list  

Optimize the framework for better performance

php artisan optimize  

List all registered routes

php artisan route:list  

Remove the route cache file

php artisan route:clear  

Serve the application on the PHP development server

php artisan serve  

Interact with your application

php artisan tinker  

Bring the application out of maintenance mode

php artisan up  

Set the application namespace

php artisan app:name  

Create a migration for the password reminders table

php artisan auth:reminders  

Flush expired password reset tokens

php artisan auth:clear-resets  

Flush the application cache

php artisan cache:clear  

Create a new Artisan command (L3:task)

php artisan make:console name [--command[="..."]] [--path[="..."]] [--namespace[="..."]]  

Publish a package's configuration to the application

php artisan config:publish  

Create a new controller class

php artisan make:controller  

Seed the database with records

php artisan db:seed  

Set the application key

php artisan key:generate  

Database migrations

php artisan migrate [--bench="vendor/package"] [--database[="..."]] [--path[="..."]] [--package[="..."]] [--pretend] [--seed]  

Create the migration repository

php artisan migrate:install [--database[="..."]]  

Create a new migration file

php artisan make:migration  

Reset and re-run all migrations

php artisan migrate:refresh [--database[="..."]] [--seed]  

Rollback all database migrations

php artisan migrate:reset [--database[="..."]] [--pretend]  

Rollback the last database migration

php artisan migrate:rollback [--database[="..."]] [--pretend]  

Listen to a given queue

php artisan queue:listen [--queue[="..."]] [--delay[="..."]] [--memory[="..."]] [--timeout[="..."]] [connection]  

Process the next job on a queue

php artisan queue:work [--queue[="..."]] [--delay[="..."]] [--memory[="..."]] [--sleep] [connection]  

Create a migration for the session database table

php artisan session:table  

Publish any publishable assets from vendor packages

php artisan vendor:publish [--path[="..."]] package