Show Menu
Cheatography

Laravel 6 Artisan commands Cheat Sheet by

Laravel 6 Artisan commands

Options

-h, --help
Display the Artisan help
-q, --quiet
Do not output any message
-n, --no-i­nte­raction
Do not ask any intera­ctive question
--env[­=ENV]
The enviro­nment the comment should run under
-v|vv|vvv
Increase verbosity of messages

General commands

clear-­com­piled
Remove compiled class file
down
Turn on mainte­nance mode
env
Display current enviro­nment
help
Display help for a command
inspire
Display inspiring quote
list
Lists commands
migrate
Run database migrations
optimize
Cache bootstrap files
preset
Swap front-end scaffo­lding
serve
Serve applic­ation on PHP dev server
tinker
Interact with your applic­ation
up
Turn off mainte­nance mode

Auth

auth:c­lea­r-r­esets
Flush expired password reset tokens

Cache

cache:­clear
Flush applic­ation cache
cache:­forget
Remove item from cache
cache:­table
Create a migration for the cache table

Clean

clean:­events
Cleanup events

Config

config­:cache
create config­uration cache
config­:clear
clear config­uration cache

db

db:seed
Seed the database
db:wipe
Drop all tables­,views and types

event

event:­cache
cache all events and listeners
event:­clear
clear cached events and listeners
event:­gen­erate
generate missing events and listeners
event:list
list events and listeners
 

key

key:ge­nerate
Generate and set the applic­ation key

make

make:c­hannel
New channel class
make:c­ommand
New Artisan command
make:c­ont­roller
New controller class
make:event
New event class
make:e­xce­ption
New exception class
make:f­actory
Create a new model factory
make:job
New job class
make:l­istener
New event listener class
make:mail
New email class
make:m­idd­leware
New middleware class
make:m­igr­ation
New migration file
make:model
New Eloquent model class
make:n­oti­fic­ation
New notifi­cation class
make:o­bserver
New observer class
make:p­olicy
New policy class
make:p­rovider
New service provider class
make:r­equest
New form request class
make:r­esource
New resource
make:rule
New validation rule
make:s­eeder
New seeder class
make:test
New test class

Migrate

migrat­e:fresh
Drop tables and re-run migrations
migrat­e:i­nstall
Create migration repository
migrat­e:r­efresh
Rollback and re-run all migrations
migrat­e:reset
Rollback all migrations
migrat­e:r­ollback
Rollback the last migration
migrat­e:s­tatus
Show the status of each migration
           
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          PHP Cheat Sheet
          MySQL Cheat Sheet
          PHP-FIG PSR Standards Cheat Sheet