Красноречивая сеялка
php artisan db:seed --class=UserSeeder
Relieved Raccoon
php artisan db:seed --class=UserSeeder
factory(User::class, 10)->create()->each(function ($user) {
$user->posts()->saveMany(factory(Posts::class, 5)->make());
});