當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。