/** * Update user settings * @param Request $request * @param Authenticatable $auth * @return */ public function doSettings(Request $request, Authenticatable $auth) { $input = $request->only('username', 'email'); $this->validate($request, ['username' => 'required|between:3,20|unique:users,username,' . $auth->id, 'email' => 'required|email|unique:users,email,' . $auth->id]); $this->userService->updateInfo($input); return redirect()->back(); }
/** * Logout user from admin panel * * @return mixed */ public function doLogout() { $this->user->logout(); return Redirect::route('admin.login'); }