/**
  * Handles role update
  *
  * @param EditRoleRequest $request
  * @param int $id Role id
  * @return RedirectResponse
  */
 public function putEdit(EditRoleRequest $request, $id)
 {
     $role = Role::find($id);
     $check = Role::checkOnEdit($role->id, ['role' => $request->input('role')]);
     if (!$check) {
         $role->role = $request->input('role');
         $role->save();
         flash()->success(trans('roles.role_edited'));
     } else {
         flash()->error(trans('roles.role_exists'));
     }
     return redirect()->back();
 }