Answers for "make a seeding file in laravel"

PHP
28

laravel run seed

#All of them
php artisan db:seed
#One class
php artisan db:seed --class=UserSeeder
Posted by: Guest on May-08-2020
3

how to make db seeder in laravel

php artisan make:seeder UsersTableSeeder
Posted by: Guest on January-06-2021
1

laravel 8 seeding

/**
 * Run the database seeders.
 *
 * @return void
 */
public function run()
{
    $this->call([
        UserSeeder::class,
        PostSeeder::class,
        CommentSeeder::class,
    ]);
}
Posted by: Guest on December-04-2020
0

make a seeding file in laravel

1#create a laravel seeding file
php artisan make:seeder <seeder file name>
#example
php artisan make:seeder ShopSeeder
2#after seeding file create and seed data added,run this command below to add thos data in database
php artisan db:seed --class=<seeder file name>
#example
php artisan db:seed --class=ShopSeeder
3# if want to add all seeder fill data just run
php artisan db:seed
Posted by: Guest on February-15-2022

Browse Popular Code Answers by Language