seed specific table laravel code example
Example 1: seed specific table
php artisan db:seed --class=UserTableSeeder
Example 2: how to run specific seeder in laravel
php artisan db:seed --class=UserSeeder
Example 3: laravel make seeder
php artisan make:seeder NameOfTheSeeder
Example 4: laravel database seeder
insert([
'name' => Str::random(10),
'email' => Str::random(10).'@gmail.com',
'password' => Hash::make('password'),
]);
}
}