示例#1
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());
 }
示例#2
0
 /**
  * @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());
 }