Exemplo n.º 1
0
 public function run()
 {
     DB::table('group_user')->delete();
     $user = User::whereEmail('admin')->firstOrFail();
     $group = Group::whereType(Group::ADMIN)->firstOrFail();
     $group->users()->attach($user);
 }
Exemplo n.º 2
0
 public function run()
 {
     Eloquent::unguard();
     DB::table('groups')->delete();
     Group::create(array('id' => 1, 'name' => 'Administrador', 'type' => Group::ADMIN));
 }