database/seeders/AdminSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $check = User::where('email', 'admin@gmail.com')->first();
        if(!$check){
            DB::table('users')->insert([
                'name' => 'Admin',
                'email' => 'admin@gmail.com',
                'referral' => 'Admin', 
                'password' => Hash::make('Admin@123'),
                'role' => 'Admin',
            ]);
        }
    }
public function run ( ) { $ check = User :: where ( 'email' , 'admin@gmail.com' ) -> first ( ) ; if ( ! $ check ) { DB :: table ( 'users' ) -> insert ( [ 'name' => 'Admin' , 'email' => 'admin@gmail.com' , 'referral' => 'Admin' , 'password' => Hash :: make ( 'Admin@123' ) , 'role' => 'Admin' , ] ) ; } }
Run the database seeds.
Run the database seeds .