database/seeders/DatabaseSeeder.php
/**
     * Seed the application's database.
     *
     * @return void
     */
Seed the application's database.
@return void
Seed the application ' s database . @return void
public function run()
    {
        $role = Role::factory()->create([
            'name' => 'user', 
            'slug' => 'user',
        ]);
        User::factory(10)->create([
            'role_id' => $role->id,
        ]);
        sample::create([
            'type' => 'essays',
        ]);
        meta_sample::factory(30)->create();
    }
public function run ( ) { $ role = Role :: factory ( ) -> create ( [ 'name' => 'user' , 'slug' => 'user' , ] ) ; User :: factory ( 10 ) -> create ( [ 'role_id' => $ role -> id , ] ) ; sample :: create ( [ 'type' => 'essays' , ] ) ; meta_sample :: factory ( 30 ) -> create ( ) ; }
Seed the application's database.
Seed the application ' s database .