当前位置: 首页>>代码示例>>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;未经允许,请勿转载。