testing RedirectIfAuthenticated middleware
This commit is contained in:
@@ -16,6 +16,16 @@ use Seat\Eseye\Eseye;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
|
||||
public function handle($request, Closure $next, $guard = null)
|
||||
{
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect('/home');
|
||||
}
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
@@ -24,6 +34,7 @@ class RedirectIfAuthenticated
|
||||
* @param string|null $guard
|
||||
* @return mixed
|
||||
*/
|
||||
/*
|
||||
public function handle($request, Closure $next, $guard = null)
|
||||
{
|
||||
if($request->pathInfo == '/login' && Auth::guard($guard)->check()) {
|
||||
@@ -39,6 +50,7 @@ class RedirectIfAuthenticated
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Update the user information in the database
|
||||
|
||||
Reference in New Issue
Block a user