database/seeds/UserTableSeeder.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 = [
            ['id' => str_random(36), 'username' => 'Hasan Basri', 'email' => 'mantemanku27@gmail.com', 'password' => bcrypt('mantemanku27'), 'level' => '0', 'verifikasi' => '0','pin' => 272727,  'created_at' => \Carbon\Carbon::now()],
            ['id' => str_random(36), 'username' => 'Bunda Maharani', 'email' => 'bundahirfi@gmail.com', 'password' => bcrypt('bunda46'), 'level' => '1','verifikasi' => '0','pin' => 397613,  'created_at' => \Carbon\Carbon::now()],
        ];
        DB::table('users')->insert($user);
    }
public function run ( ) { DB :: table ( 'users' ) -> truncate ( ) ; $ user = [ [ 'id' => str_random ( 36 ) , 'username' => 'Hasan Basri' , 'email' => 'mantemanku27@gmail.com' , 'password' => bcrypt ( 'mantemanku27' ) , 'level' => '0' , 'verifikasi' => '0' , 'pin' => 272727 , 'created_at' => \ Carbon \ Carbon :: now ( ) ] , [ 'id' => str_random ( 36 ) , 'username' => 'Bunda Maharani' , 'email' => 'bundahirfi@gmail.com' , 'password' => bcrypt ( 'bunda46' ) , 'level' => '1' , 'verifikasi' => '0' , 'pin' => 397613 , 'created_at' => \ Carbon \ Carbon :: now ( ) ] , ] ; DB :: table ( 'users' ) -> insert ( $ user ) ; }
Run the database seeds.
Run the database seeds .
// Truncate record // Insert Batch