/**
  * @param  SortPermissionGroupRequest      $request
  * @return \Illuminate\Http\JsonResponse
  */
 public function updateSort(SortPermissionGroupRequest $request)
 {
     $this->groups->updateSort($request->get('data'));
     return response()->json(['status' => 'OK']);
 }
 /**
  * @param $id
  * @param PermissionGroupRepositoryContract $group
  * @param EditRoleRequest $request
  * @return mixed
  */
 public function edit($id, PermissionGroupRepositoryContract $group, EditRoleRequest $request)
 {
     $role = $this->roles->findOrThrowException($id, true);
     return view('backend.access.roles.edit')->withRole($role)->withRolePermissions($role->permissions->lists('id')->all())->withGroups($group->getAllGroups())->withPermissions($this->permissions->getUngroupedPermissions());
 }
예제 #3
0
 /**
  * @param  $id
  * @param EditPermissionRequest $request
  *
  * @return mixed
  */
 public function edit($id, EditPermissionRequest $request)
 {
     $permission = $this->permissions->findOrThrowException($id, true);
     return view('backend.access.roles.permissions.edit')->withPermission($permission)->withPermissionRoles($permission->roles->lists('id')->all())->withGroups($this->groups->getAllGroups(true))->withRoles($this->roles->getAllRoles())->withPermissions($this->permissions->getAllPermissions())->withPermissionDependencies($permission->dependencies->lists('dependency_id')->all());
 }