for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Seeder;
class UserSeeder extends Seeder
{
public function run()
// Uncomment the below to wipe the table clean before populating
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
DB::table('users')->truncate();
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
$users = [
[
'username' => 'riddles',
'password' => bcrypt('test'),
'firstName' => 'Brandon',
'lastName' => 'Hyde',
'email' => '[email protected]',
'timezone' => 'US/Central',
'created_at' => date('Y-m-d H:i:s'),
],
'username' => 'Stygian',
'firstName' => 'Travis',
'lastName' => 'Blasingame',
];
// Uncomment the below to run the seeder
DB::table('users')->insert($users);
}