當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Guard::logout方法代碼示例

本文整理匯總了PHP中Illuminate\Auth\Guard::logout方法的典型用法代碼示例。如果您正苦於以下問題:PHP Guard::logout方法的具體用法?PHP Guard::logout怎麽用?PHP Guard::logout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Auth\Guard的用法示例。


在下文中一共展示了Guard::logout方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: confirm

 /**
  * Chequea el codigo y redireciona segun el repo.
  * @param string $code el codigo en 32 caracteres.
  * @return \Illuminate\Http\RedirectResponse
  */
 public function confirm($code)
 {
     if (!$code) {
         return Redirect::route('index');
     }
     if (!$this->userRepo->confirmCode($code)) {
         return Redirect::route('index');
     }
     $this->auth->logout();
     Flash::success('Ud. ha verificado exitosamente su cuenta.');
     return Redirect::route('auth.getLogin');
 }
開發者ID:slayerfat,項目名稱:sistemaPCI,代碼行數:17,代碼來源:UserConfirmationController.php

示例2: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (!$this->auth->user()->isAdmin()) {
         $this->auth->logout();
         if ($request->ajax()) {
             return response('Unauthorized.', 401);
         } else {
             return redirect()->to('auth/login');
         }
     }
     return $next($request);
 }
開發者ID:pacho104,項目名稱:ejemplo3,代碼行數:19,代碼來源:IsAdmin.php

示例3: logout

 /**
  * @return boolean
  */
 public function logout()
 {
     $userInfoForEventTrigger = $this->auth->user();
     $this->auth->logout();
     \Event::fire(new LoggedOut($userInfoForEventTrigger));
     return true;
 }
開發者ID:AudithSoftworks,項目名稱:Basis-API,代碼行數:10,代碼來源:Registrar.php

示例4: logout

 /**
  * Log the user out of the application.
  *
  * @return void 
  * @static 
  */
 public static function logout()
 {
     \Illuminate\Auth\Guard::logout();
 }
開發者ID:satriashp,項目名稱:tour,代碼行數:10,代碼來源:_ide_helper.php

示例5: out

 /**
  * Signs the user out.
  *
  * @param \Illuminate\Auth\Guard $auth
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function out(Guard $auth)
 {
     $auth->logout();
     return redirect('/');
 }
開發者ID:bigbitecreative,項目名稱:paddle,代碼行數:12,代碼來源:OAuthController.php

示例6: doLogout

 /**
  * Logout user from the app
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function doLogout()
 {
     $this->auth->logout();
     return redirect()->route('home');
 }
開發者ID:vjaykoogu,項目名稱:smile-media-laravel,代碼行數:10,代碼來源:AuthController.php

示例7: logout

 public function logout(Guard $auth)
 {
     $auth->logout();
     return redirect()->route('auth.login');
 }
開發者ID:abidnurulhakim,項目名稱:qa-crawler,代碼行數:5,代碼來源:SiteController.php

示例8: logout

 /**
  * Log the user out of the application.
  *
  * @return void
  */
 public function logout()
 {
     parent::logout();
 }
開發者ID:gponster,項目名稱:laravel-auth-file,代碼行數:9,代碼來源:Guard.php

示例9: logout

 /**
  * @param Guard $guard
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function logout(Guard $guard)
 {
     $guard->logout();
     return redirect()->back();
 }
開發者ID:JunkyPic,項目名稱:Minecraft-Files,代碼行數:10,代碼來源:UserController.php

示例10: logout

 /**
  * {@inheritdoc}
  */
 public function logout()
 {
     parent::logout();
     // We should flush the cached user roles relationship so any
     // subsequent request would re-validate all information,
     // instead of referring to the cached value.
     $this->userRoles = null;
 }
開發者ID:stevebauman,項目名稱:auth,代碼行數:11,代碼來源:Guard.php

示例11: logout

 public function logout()
 {
     Session::forget($this->provider->getTokenName());
     App::make('google-client')->revokeToken();
     parent::logout();
 }
開發者ID:themonkeys,項目名稱:laravel-google-auth,代碼行數:6,代碼來源:GoogleAuthGuard.php

示例12: logout

 public function logout()
 {
     $this->loalevel = 0;
     $this->session->set($this->getLoaName(), $this->loalevel);
     parent::logout();
 }
開發者ID:alexgr,項目名稱:OidConnect,代碼行數:6,代碼來源:LoaAuthGuard.php

示例13: logout

 public function logout()
 {
     $this->auth->logout();
     return redirect('/');
 }
開發者ID:viktory,項目名稱:chat,代碼行數:5,代碼來源:UsersController.php

示例14: logout

 /**
  * Log out the current user.
  *
  * @return void
  */
 public function logout()
 {
     $this->auth->logout();
 }
開發者ID:anlutro,項目名稱:l4-core,代碼行數:9,代碼來源:UserManager.php

示例15: logout

 /**
  * Log the user out of the application.
  */
 public function logout()
 {
     if ($this->check()) {
         parent::logout();
     }
 }
開發者ID:master0mind,項目名稱:Lavender,代碼行數:9,代碼來源:Guard.php


注:本文中的Illuminate\Auth\Guard::logout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。