示例#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);
 }
示例#2
0
 public function run()
 {
     Eloquent::unguard();
     DB::table('groups')->delete();
     Group::create(array('id' => 1, 'name' => 'Administrador', 'type' => Group::ADMIN));
 }