RedirectIfAuthenticated
class RedirectIfAuthenticated
Properties
| static protected null|callable | $redirectToCallback | The callback that should be used to generate the authentication redirect path. |
Methods
Specify the guards for the middleware.
Get the path the user should be redirected to when they are authenticated.
Get the default URI the user should be redirected to when they are authenticated.
Specify the callback that should be used to generate the redirect path.
Flush all static state.
Details
at line 26
static string
using(string $guard, string ...$others)
Specify the guards for the middleware.
at line 34
Response
handle(Request $request, Closure $next, string ...$guards)
Handle an incoming request.
at line 56
protected string|null
redirectTo(Request $request)
Get the path the user should be redirected to when they are authenticated.
at line 66
protected string
defaultRedirectUri()
Get the default URI the user should be redirected to when they are authenticated.
at line 91
static void
redirectUsing(callable $redirectToCallback)
Specify the callback that should be used to generate the redirect path.
The callback persists in a static property for the worker lifetime and runs on every already-authenticated request handled by this middleware.
at line 100
static void
flushState()
Flush all static state.