本文整理汇总了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());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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');
}