Authenticate
class Authenticate implements AuthenticatesRequests
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.
Determine if the user is logged in to any of the given guards.
Get the path the user should be redirected to when they are not authenticated.
Specify the callback that should be used to generate the redirect path.
Flush all static state.
Details
at line 27
__construct(Factory $auth)
Create a new middleware instance.
at line 35
static string
using(string $guard, string ...$others)
Specify the guards for the middleware.
at line 45
Response
handle(Request $request, Closure $next, string ...$guards)
Handle an incoming request.
at line 57
protected void
authenticate(Request $request, array $guards)
Determine if the user is logged in to any of the given guards.
at line 79
protected never
unauthenticated(Request $request, array $guards)
Handle an unauthenticated user.
at line 91
protected string|null
redirectTo(Request $request)
Get the path the user should be redirected to when they are not authenticated.
at line 107
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 unauthenticated request handled by this middleware.
at line 116
static void
flushState()
Flush all static state.