0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【laravel5.8】php artisan migrate --seedでseedが効かない時

Posted at

database>seeds>DatabaseSeeder.phpに自分が作ったSeederが登録されてるか確認してみてください。

DatabaseSeeder.php
<?php

use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        $this->call(UsersTableSeeder::class);
        $this->call(GroupsTableSeeder::class);
        $this->call(AgendasTableSeeder::class);
        $this->call(CommentsTableSeeder::class);
    }
}

laravel公式リファレンスだとマイグレーションと一緒にテストデータを流し込む際に「php artisan migrate --seedで一髪完了!」と書いてあるのになかなかできなかったので調べてみました。
同じエラーで困ってる方がいたらご参考までに。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?