本文整理汇总了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');
}
示例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);
}
示例3: logout
/**
* @return boolean
*/
public function logout()
{
$userInfoForEventTrigger = $this->auth->user();
$this->auth->logout();
\Event::fire(new LoggedOut($userInfoForEventTrigger));
return true;
}
示例4: logout
/**
* Log the user out of the application.
*
* @return void
* @static
*/
public static function logout()
{
\Illuminate\Auth\Guard::logout();
}
示例5: out
/**
* Signs the user out.
*
* @param \Illuminate\Auth\Guard $auth
*
* @return \Illuminate\Http\RedirectResponse
*/
public function out(Guard $auth)
{
$auth->logout();
return redirect('/');
}
示例6: doLogout
/**
* Logout user from the app
*
* @return \Illuminate\Http\RedirectResponse
*/
public function doLogout()
{
$this->auth->logout();
return redirect()->route('home');
}
示例7: logout
public function logout(Guard $auth)
{
$auth->logout();
return redirect()->route('auth.login');
}
示例8: logout
/**
* Log the user out of the application.
*
* @return void
*/
public function logout()
{
parent::logout();
}
示例9: logout
/**
* @param Guard $guard
*
* @return \Illuminate\Http\RedirectResponse
*/
public function logout(Guard $guard)
{
$guard->logout();
return redirect()->back();
}
示例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;
}
示例11: logout
public function logout()
{
Session::forget($this->provider->getTokenName());
App::make('google-client')->revokeToken();
parent::logout();
}
示例12: logout
public function logout()
{
$this->loalevel = 0;
$this->session->set($this->getLoaName(), $this->loalevel);
parent::logout();
}
示例13: logout
public function logout()
{
$this->auth->logout();
return redirect('/');
}
示例14: logout
/**
* Log out the current user.
*
* @return void
*/
public function logout()
{
$this->auth->logout();
}
示例15: logout
/**
* Log the user out of the application.
*/
public function logout()
{
if ($this->check()) {
parent::logout();
}
}