Cheat Sheet


Displays help for a given command

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

-v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

php artisan --verbose

Display the framework change list

php artisan changes

Remove the compiled class file

php artisan clear-compiled

Put the application into maintenance mode

php artisan down

Bring the application out of maintenance mode

php artisan up

Regenerate framework autoload files

php artisan dump-autoload

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

Serve the application on the PHP development server

php artisan serve

Change the default port

php artisan serve --port 8080

Get it to work outside localhost

php artisan serve --host

Interact with your application

php artisan tinker

Create a new package workbench

php artisan workbench

Publish a package's assets to the public directory

php artisan asset:publish --bench[="vendor/package"]][package]

Create a migration for the password reminders table

php artisan auth:reminders-table

Flush the application cache

php artisan cache:clear

Create a new Artisan command (L3:task)

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

Publish a package's configuration to the application

php artisan config:publish

Create a new resourceful controller

php artisan controller:make [--bench="vendor/package"]

Seed the database with records

php artisan db:seed --class[="..."]]

Set the application key

php artisan key:generate

Database migrations

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

Create the migration repository

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

Create a new migration file

php artisan migrate:make name --bench="vendor/package" --package[="..."]][--table[="..."]]

Reset and re-run all migrations

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

Rollback all database migrations

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

Rollback the last database migration

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

Publish a package's migrations to migration directory

php artisan migrate:publish vendor/package

Listen to a given queue

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

Subscribe a URL to an push queue

php artisan queue:subscribe [--type[="..."]] queue url

Process the next job on a queue

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

Create a migration for the session database table

php artisan session:table

Publish a package's views to the application

php artisan view:publish [--path[="..."]] package
php artisan tail --path[="..."]][connection]


composer create-project laravel/laravel folder_name
composer install
composer update
composer dump-autoload [--optimize]
composer self-update