LoginSignup
0
0

More than 1 year has passed since last update.

laravel シーダの実行時の注意点 個人メモ

Posted at

目的

  • laravelのシーダーを実行した際にちょっと戸惑ったのでメモ的に記載する。

コマンドで指定したシーダーだけ実行される

  • シーディング時には下記コマンドを実行する。

    $ php artisan db:seed シーダークラス名
    
  • 当たり前だがコマンドで指定したシーダークラス名のもののみ反映される。

  • アプリ名ディレクトリ/database/seeds/直下のシーダークラスをシーディングしたい場合、その個数分だけシーディングする必要がある。

0
0
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
0
0