/** * 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(); }
/** * 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')); }