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()
    {
        DB::table('users')->truncate();
        User::create([
            'name'=>'admin',
            'email'=>'admin@gmail.com',
            'password'=>Hash::make(123456),
            'role'=>'admin',
        ]);
        User::create([
            'name'=>'user',
            'email'=>'user@gmail.com',
            'password'=>Hash::make(123456),
            'role'=>'user',
        ]);
    }
public function run ( ) { DB :: table ( 'users' ) -> truncate ( ) ; User :: create ( [ 'name' => 'admin' , 'email' => 'admin@gmail.com' , 'password' => Hash :: make ( 123456 ) , 'role' => 'admin' , ] ) ; User :: create ( [ 'name' => 'user' , 'email' => 'user@gmail.com' , 'password' => Hash :: make ( 123456 ) , 'role' => 'user' , ] ) ; }
Run the database seeds.
Run the database seeds .
//