Answers for "how to make seeder in laravel 8"

PHP
21

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
1

how to make db seeder in laravel

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

laravel 8 seeding

php artisan db:seed --force
Posted by: Guest on December-04-2020
0

make php artisan db:seed working

class DatabaseSeeder extends Seeder
{
    public function run()
    {
        $this->call(ArticlesTableSeeder::class);
        $this->call(UsersTableSeeder::class);
    }
}
Posted by: Guest on July-07-2021
0

laravel 8 seeding

use App\Models\User;

/**
 * Run the database seeders.
 *
 * @return void
 */
public function run()
{
    User::factory()
            ->times(50)
            ->hasPosts(1)
            ->create();
}
Posted by: Guest on December-04-2020

Browse Popular Code Answers by Language