LoginSignup
26
24

More than 5 years have passed since last update.

Laravelのartisanコマンドまとめ

Last updated at Posted at 2018-11-07

Laravelのコマンドを備忘録的にまとめていきます。

controller作成

 php artisan make:controller HelloController

Model作成

 php artisan make:model User

Modelの生成先を指定したい場合

 php artisan make:model Models`\\`User

Modelを削除したい場合

 手動でファイルを削除する

認証機能を作成したい場合

 php artisan make:auth

Laravelのmake authで認証機能を作る

その他のmakeコマンド

 make:command          artisanコマンド作成
 make:event            イベントククラス作成
 make:exception        exceptionクラス作成
 make:factory          Create a new model factory
 make:job              jobクラス作成
 make:listener         listenerクラス作成
 make:mail             emailクラス作成
 make:middleware       middlewareクラス作成
 make:migration        migrationファイルの作成
 make:notification     notificationクラスの作成
 make:policy           policyクラスの作成
 make:provider         service providerクラスの作成
 make:request          requestクラス作成
 make:resource         Create a new resource
 make:rule             validation ruleの作成
 make:seeder           seederクラス作成
 make:test             testクラスの作成

cacheクリア

 php artisan cache:clear
 php artisan config:clear
 php artisan route:clear
 php artisan view:clear
26
24
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
26
24