database/seeders/UserSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
       User::factory(20)->create();
        User::factory()->create([
            'first-name' => 'Admin',
            'last-name' => 'Admin',
            'email' => 'admin@admin.com',
            'role_id' => 1,
        ]);
        User::factory()->create([
            'first-name' => 'Editor',
            'last-name' => 'Editor',
            'email' => 'editor@editor.com',
            'role_id' => 2,
        ]);
        User::factory()->create([
            'first-name' => 'Viewer',
            'last-name' => 'Viewer',
            'email' => 'viewer@viewer.com',
            'role_id' => 3,
        ]);
    }
public function run ( ) { User :: factory ( 20 ) -> create ( ) ; User :: factory ( ) -> create ( [ 'first-name' => 'Admin' , 'last-name' => 'Admin' , 'email' => 'admin@admin.com' , 'role_id' => 1 , ] ) ; User :: factory ( ) -> create ( [ 'first-name' => 'Editor' , 'last-name' => 'Editor' , 'email' => 'editor@editor.com' , 'role_id' => 2 , ] ) ; User :: factory ( ) -> create ( [ 'first-name' => 'Viewer' , 'last-name' => 'Viewer' , 'email' => 'viewer@viewer.com' , 'role_id' => 3 , ] ) ; }
Run the database seeds.
Run the database seeds .
//create 20 more users //made admin arcoded //made editor arcoded //made admin viewer