php artisan migrate:fresh --seed
//All Seeders
php artisan db:seed
//One Seeder
php artisan db:seed --class=NameSeeder
php artisan make:seeder UsersTableSeeder
#To create a seeder
php artisan make:seeder CategorySeeder
$ php artisan make:seeder MoviesTableSeeder
// in DatabaseSeeder.php file
$this->call([
UserSeeder::class,
]);
php artisan db:seed
php artisan db:seed --class=UserSeeder
class UsersTableSeeder extends Seeder
{
public function run()
{
$limit = env('SEEDER_LIMIT', 1);
echo $this->limit;
}
}
//In terminal run:
SEEDER_LIMIT=10 php artisan db:seed --class=UsersTableSeeder