database/seeds/UserSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        Schema::disableForeignKeyConstraints();
        DB::table('users')->truncate();
        Schema::enableForeignKeyConstraints();
        DB::table('users')->insert([
            'name' => 'User',
            'email' => 'example@example.com',
            'email_verified_at' => Carbon::now(),
            'password' => bcrypt('password'),
            'remember_token' => Str::random(10),
            'created_at' => Carbon::now(),
            'updated_at' => Carbon::now()
        ]);
    }
public function run ( ) { Schema :: disableForeignKeyConstraints ( ) ; DB :: table ( 'users' ) -> truncate ( ) ; Schema :: enableForeignKeyConstraints ( ) ; DB :: table ( 'users' ) -> insert ( [ 'name' => 'User' , 'email' => 'example@example.com' , 'email_verified_at' => Carbon :: now ( ) , 'password' => bcrypt ( 'password' ) , 'remember_token' => Str :: random ( 10 ) , 'created_at' => Carbon :: now ( ) , 'updated_at' => Carbon :: now ( ) ] ) ; }
Run the database seeds.
Run the database seeds .