示例#1
0
 /**
  * Update the specified resource in storage.
  *
  * @param Request $request
  * @param int     $id
  *
  * @return Response
  */
 public function update(RoleRequest $request, $id)
 {
     $input = $request->except('permissions');
     $record = $this->model->findOrFail($id);
     $record->syncPermissions($request->permissions);
     $record->update($input);
     $this->notify(['type' => 'success', 'title' => 'Successful update!', 'description' => 'This role is updated successfully.']);
     return redirect()->back();
 }
示例#2
0
 /**
  * Update roles
  *
  * @param  App\requests\RoleRequest $request
  * @return Response
  */
 public function postRoles(RoleRequest $request)
 {
     $this->role_gestion->update($request->except('_token'));
     return redirect('user/roles')->with('ok', trans('back/roles.ok'));
 }