예제 #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
 }
예제 #3
0
 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 : '/');
 }
예제 #5
0
 /**
  *  退出登录
  */
 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('/');
 }
예제 #8
0
 /**
  * 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();
 }
예제 #20
0
 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'];
 }