Show Menu

Laravel 5.8: Artisan Cheat Sheet by

php     artisan     laravel-5-8

General

php artisan --env=dev
Use .env.dev file
php artisan optimize
Dump composer autoload and compile common classes and view files
php artisan optimi­ze:­clear
Clear optimized files
php artisan serve
Serve applic­ation using the serve­r.php file
php artisan key:ge­nerate
Generate APP_KEY in .env
php artisan config­:cache
Cache app settings and .env variables
php artisan vendor­:pu­blish --tag=­lar­ave­l-n­oti­fic­ations
Publish assets for Laravel's default email template

Migrations

php artisan migrate
Migrate
php artisan migrate --seed
Migrate + Seed
php artisan migrat­e:fresh --seed
Migrate (from scratch) + Seed
php artisan migrat­e:i­nstall
Install migrations to DB configured in .env file

Make

php artisan make:auth
Make Authen­tic­ation
php artisan make:s­eeder <na­me>
Make a Seeder
php artisan make:f­actory <na­me>
Make a Factory
php artisan make:r­equest <na­me>
Make a Request
php artisan make:r­esource <na­me>
Make a Resource
php artisan make:m­igr­ation <na­me>
Make a Migration
php artisan make:model -m "­pat­h\i­n\a­pp­\<na­me>­"
Make a Model + Migration
php artisan make:mail <na­me>
Make Mail (using default template)
php artisan make:c­ont­roller "­pat­h\i­n\a­pp­\<na­me>­"
Make a Controller (with custom path)
php artisan make:n­oti­fic­ation
Make a Notifi­cation

ide-helper Package

php artisan ide-he­lpe­r:g­ene­rate
Generate ide-helper file
php artisan ide-he­lpe­r:m­odels
Generate DocBlocks for your models using ide-helper
php artisan vendor­:pu­blish --prov­ide­r="B­arr­yvd­h\L­ara­vel­Ide­Hel­per­\Id­eHe­lpe­rSe­rvi­ceP­rov­ide­r" --tag=­config
Publish ide-h­elper config file

spatie­/la­rav­el-­per­mission Package

php artisan vendor­:pu­blish --prov­ide­r="S­pat­ie­\Per­mis­sio­n\P­erm­iss­ion­Ser­vic­ePr­ovi­der­" --tag=­"­con­fig­"
Publish package's settings

Download the Laravel 5.8: Artisan Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/cudacoder_laravel-5-8-artisan.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

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
          Laravel 6 Artisan commands Cheat Sheet