示例#1
0
 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogout()
 {
     $user = \Auth::user()->name;
     \Auth::logout();
     \Session::flash('flash_message', $user . ': You have been logged out.');
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
示例#2
0
 public function logout()
 {
     \Auth::logout();
     // logout user
     return \Redirect::to('admin/login');
     //redirect back to login
 }
 public function getLogout()
 {
     \Session::flush();
     \Cache::flush();
     \Auth::logout();
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
示例#4
0
 public function getLogout()
 {
     \Auth::logout();
     \Session::flash('flash_message', 'You have been logged out');
     \Session::flash('flash_type', 'alert-info');
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
 /**
  *  退出登录
  */
 public function logout()
 {
     if (Auth::check()) {
         Auth::logout();
     }
     return Redirect::to('login');
 }
示例#6
0
 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogout()
 {
     \Auth::logout();
     \Session::flash('flash_message', 'You are Logged Out.');
     return redirect('/');
     //return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
示例#7
0
 /**
  * Override the default getLogout method.
  * After logging out, unset/forget the jwt cookie.
  *
  * @return $this
  */
 public function getLogout()
 {
     //unset the cookie
     JWTService::unsetCookie();
     \Auth::logout();
     return redirect('/');
 }
 /**
  * Overwrite the getLogout function in Illuminate\Foundation\Auth\AuthenticatesUsers;
  */
 public function getLogout()
 {
     \Auth::logout();
     \Session::forget('cart_merge');
     // custom feature
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/home');
 }
 /**
  * Display a login page
  *
  * @return \Illuminate\Http\Response
  */
 public function logout()
 {
     if (!\Auth::check()) {
         return redirect('/login');
     }
     \Auth::logout();
     return redirect('/login');
 }
 public function logout(Request $request)
 {
     \Auth::logout();
     if ($request->wantsJson()) {
         return response()->json(['success' => true], 200);
     }
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
示例#11
0
 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogout()
 {
     // logout user
     \Auth::logout();
     // indicate user is logged out
     \Session::flash('flash_message', 'You have been logged out.');
     // delete all data from the global session
     \Session::flush();
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
 public function postLogin(Request $request)
 {
     $this->validate($request, ['email' => 'required|email', 'password' => 'required']);
     $credentials = $request->only('email', 'password');
     if ($this->auth->attempt($credentials, $request->has('remember'))) {
         $user = \Auth::user();
         if ($user->accessible == 0) {
             \Auth::logout();
             return redirect()->back()->withErrors(['Your Account has been blocked']);
         } else {
             return redirect()->intended($this->redirectPath());
         }
     }
     return redirect($this->loginPath())->withInput($request->only('email', 'remember'))->withErrors(['email' => $this->getFailedLoginMessage()]);
 }
示例#13
0
 /**
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
  */
 public function logout()
 {
     \Auth::logout();
     return redirect('/');
 }
示例#14
0
 public function getLogout()
 {
     \Session::flash('flash_message', 'Thank You for Stopping By. We Look Forward To The Next Time!');
     \Auth::logout();
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
示例#15
0
 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogout()
 {
     \Auth::logout();
     flash()->success('Logout successful');
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
示例#16
0
 /**
  * Kill current user session and redirect to login
  *
  * @param  array  $data
  * @return User
  */
 protected function logout()
 {
     \Auth::logout();
     return redirect('/auth/login');
 }
示例#17
0
文件: Auth.php 项目: sebalb/shopapp
 public function postLogout()
 {
     \Auth::logout();
     return ['status' => 'guest'];
 }
示例#18
0
 public function getLogout()
 {
     $redirect = route('home');
     if (\Auth::check()) {
         if (\Auth::user()->role_id == 1) {
             $redirect = route('adminLogin');
         }
         if (\Auth::user()->role_id == 2) {
             $redirect = route('broadcasterLogin');
         }
         \Auth::logout();
     }
     return redirect($redirect);
 }
示例#19
0
 public function logout()
 {
     \Auth::logout();
     return \Redirect::intended();
 }
 public function getLogout()
 {
     Auth::logout();
     \Session::flush();
     return redirect('auth/login');
 }
示例#21
0
 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogout()
 {
     Auth::logout();
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
示例#22
0
 protected function getLogout()
 {
     Auth::logout();
     return view('/');
 }
示例#23
0
 public function getLogout()
 {
     $logout = \Auth::logout();
     return redirect('');
 }
示例#24
0
 public function getLogout()
 {
     Auth::logout();
 }
 /**
  * For logout of Users
  *
  * @param  array  $data
  * @return \Illuminate\Contracts\Validation\Validator
  */
 public function logout()
 {
     User::where('id', '=', \Auth::user()->id)->update(array('logged_in' => '0'));
     \Auth::logout();
     \Flash::message('You are successfully logged out.');
     return \Redirect::action('GuestController@home');
 }
示例#26
0
 public function getLogout()
 {
     \Auth::logout();
     return view('auth.login');
 }
示例#27
0
 public function logout()
 {
     if (Users::getUserMaxLevel(Auth::id()) == 6) {
         Users::updateLevel(6);
     }
     Auth::logout();
     Session::flush();
     return Redirect::to("/login")->with('message', 'Successfully you are logged-out');
 }
 protected function getLogout()
 {
     $data['status'] = \Auth::logout() ? 200 : 500;
     return \Response::json($data);
 }
 /**
  * Overwrite getLogout method of trait AuthenticatesUsers;
  * @return Response
  */
 public function getLogout()
 {
     \Auth::logout();
     return redirect('auth/login')->with('status', \Lang::get('auth.loggedOut'));
 }
示例#30
0
 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogout()
 {
     \Session::flush();
     \Auth::logout();
     return ['message' => 'Logout Success!!', 'data' => '', 'code' => '200'];
 }