/** * Run the database seeds. * * @return void */ public function run() { DB::table('users')->truncate(); $user = User::create(['name' => 'Ben Rogers', 'email' => '*****@*****.**', 'password' => bcrypt('testpass')]); $user->roles()->attach(Role::byName('admin')->first()); }