database/seeds/UsersTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $user=User::where('email','tt@2.com')->first();
        if (!$user) {
          User::create([
            'name'=>'tareq',
            'email'=>'tt@2.com',
            'password'=>Hash::make('wertyuiop'),
            'role'=>'admin'
          ]);
        }
    }
public function run ( ) { $ user = User :: where ( 'email' , 'tt@2.com' ) -> first ( ) ; if ( ! $ user ) { User :: create ( [ 'name' => 'tareq' , 'email' => 'tt@2.com' , 'password' => Hash :: make ( 'wertyuiop' ) , 'role' => 'admin' ] ) ; } }
Run the database seeds.
Run the database seeds .