/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $group = Group::find($id); $group->permissions()->detach(); $group->users()->detach(); $group->delete(); return Redirect::to('/cmauth/groups'); }
public function deleteGroupPermission($gid, $pid) { $group = Group::find($gid); $group->permissions()->detach($pid); return Redirect::to('/cmauth/usersapp/groups'); }