Answers for "medium laravel seeders"

PHP
1

how to make db seeder in laravel

php artisan make:seeder UsersTableSeeder
Posted by: Guest on January-06-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