1#All of them
2php artisan db:seed
3#One class
4php artisan db:seed --class=UserSeeder
1php artisan make:model MODEL_PATH\MODEL_NAME -ms
2
3-m, --migration Create a new migration file for the model.
4-s, --seeder Create a new seeder file for the model.
1use App\Models\User;
2
3/**
4 * Run the database seeders.
5 *
6 * @return void
7 */
8public function run()
9{
10 User::factory()
11 ->times(50)
12 ->hasPosts(1)
13 ->create();
14}