当前位置: 首页>>代码示例>>PHP>>正文


PHP Auth::other方法代码示例

本文整理汇总了PHP中Illuminate\Support\Facades\Auth::other方法的典型用法代码示例。如果您正苦于以下问题:PHP Auth::other方法的具体用法?PHP Auth::other怎么用?PHP Auth::other使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Support\Facades\Auth的用法示例。


在下文中一共展示了Auth::other方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: postRegister

 /**
  * Handle a registration request for the application.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function postRegister(Request $request)
 {
     $validator = $this->validator($request->all());
     if ($validator->fails()) {
         $this->throwValidationException($request, $validator);
     }
     Auth::other()->login($this->create($request->all()));
     return redirect($this->redirectotherPath());
 }
开发者ID:marcellorg,项目名称:auth,代码行数:15,代码来源:OtherRegistersUsers.php

示例2: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (Auth::other()->check()) {
         return back();
     }
     if (Auth::admin()->check()) {
         return back();
     }
     return $next($request);
 }
开发者ID:marcellorg,项目名称:auth,代码行数:17,代码来源:userlogout.php

示例3: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (Auth::admin()->check()) {
         return back();
     }
     if (Auth::other()->check()) {
         return back();
     }
     if (Auth::user()->check()) {
         return redirect('userdashboard');
     }
     return $next($request);
 }
开发者ID:marcellorg,项目名称:auth,代码行数:20,代码来源:RedirectIfAuthenticated.php

示例4: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (\Auth::admin()->check()) {
         return back();
     }
     if (\Auth::user()->check()) {
         return back();
     }
     if (Auth::other()->guest()) {
         if ($request->ajax()) {
             return response('Unauthorized.', 401);
         } else {
             return redirect()->guest('other/login');
         }
     }
     return $next($request);
 }
开发者ID:marcellorg,项目名称:auth,代码行数:24,代码来源:OtherAuthenticate.php

示例5: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $user->password = bcrypt($password);
     $user->save();
     Auth::other()->login($user);
 }
开发者ID:marcellorg,项目名称:auth,代码行数:13,代码来源:OtherResetsPasswords.php

示例6: getLogout

 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogout()
 {
     Auth::other()->logout();
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : 'others');
 }
开发者ID:marcellorg,项目名称:auth,代码行数:10,代码来源:OtherAuthenticatesUsers.php


注:本文中的Illuminate\Support\Facades\Auth::other方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。