Complete the code to run all seeders in Laravel.
php artisan [1]Use php artisan db:seed to run all seeders and populate the database.
Complete the code to create a new seeder class named UserSeeder.
php artisan [1] UserSeederThe command php artisan make:seeder UserSeeder creates a new seeder class file.
Fix the error in the run method to insert a user with name 'Alice'.
public function run()
{
DB::table('users')->[1]([
'name' => 'Alice',
'email' => 'alice@example.com',
'password' => bcrypt('password')
]);
}Use insert to add new records to the database table.
Fill both blanks to call the UserSeeder from DatabaseSeeder.
public function run()
{
$this->[1](UserSeeder::[2]);
}Use $this->call(UserSeeder::class) to run the UserSeeder from DatabaseSeeder.
Fill all three blanks to create a factory-based seeder for 10 users.
public function run()
{
User::[1]([2])->[3]();
}Use User::factory(10)->create(); to generate and save 10 users using factories.
