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­rac­tion
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­-co­mpiled
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:­cle­ar-­resets
Flush expired password reset tokens

Cache

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

Clean

clean­:ev­ents
Cleanup events

Config

confi­g:c­ache
create config­uration cache
confi­g:c­lear
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­:ge­nerate
generate missing events and listeners
event­:list
list events and listeners
 

key

key:g­ene­rate
Generate and set the applic­ation key

make

make:­cha­nnel
New channel class
make:­com­mand
New Artisan command
make:­con­tro­ller
New controller class
make:­event
New event class
make:­exc­eption
New exception class
make:­fac­tory
Create a new model factory
make:job
New job class
make:­lis­tener
New event listener class
make:­mail
New email class
make:­mid­dle­ware
New middleware class
make:­mig­ration
New migration file
make:­model
New Eloquent model class
make:­not­ifi­cation
New notifi­cation class
make:­obs­erver
New observer class
make:­policy
New policy class
make:­pro­vider
New service provider class
make:­req­uest
New form request class
make:­res­ource
New resource
make:­rule
New validation rule
make:s­eeder
New seeder class
make:­test
New test class

Migrate

migra­te:­fresh
Drop tables and re-run migrations
migra­te:­ins­tall
Create migration repository
migra­te:­ref­resh
Rollback and re-run all migrations
migra­te:­reset
Rollback all migrations
migra­te:­rol­lback
Rollback the last migration
migrat­e:s­tatus
Show the status of each migration
           

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

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