Laravel 5.4 未为所有表格播种

Laravel 5.4 Seeds not seeding all tables

我在 Laravel 5.4 中播种,但它只播种了一个 table,其他的没有播种。 播种机是使用以下命令创建的:

php artisan make:seeder seederName

您应该在 DatabaseSeeder.php:

中注册所有播种者
$this->call(UsersTableSeeder::class);
$this->call(PostsTableSeeder::class);
$this->call(CommentsTableSeeder::class);

Within the DatabaseSeeder class, you may use the call method to execute additional seed classes. Using the call method allows you to break up your database seeding into multiple files so that no single seeder class becomes overwhelmingly large.

https://laravel.com/docs/5.4/seeding#calling-additional-seeders