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