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 25
static string
using(string $guard, string ...$others)
Specify the guards for the middleware.
at line 33
Response
handle(Request $request, Closure $next, string ...$guards)
Handle an incoming request.
at line 55
protected string|null
redirectTo(Request $request)
Get the path the user should be redirected to when they are authenticated.
at line 65
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.
Boot-only. The callback persists in a static property for the worker lifetime and runs on every already-authenticated request handled by this middleware.
at line 99
static void
flushState()
Flush all static state.