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 26
__construct(Factory $auth)
Create a new middleware instance.
at line 34
static string
using(string $guard, string ...$others)
Specify the guards for the middleware.
at line 44
Response
handle(Request $request, Closure $next, string ...$guards)
Handle an incoming request.
at line 56
protected void
authenticate(Request $request, array $guards)
Determine if the user is logged in to any of the given guards.
at line 78
protected never
unauthenticated(Request $request, array $guards)
Handle an unauthenticated user.
at line 90
protected string|null
redirectTo(Request $request)
Get the path the user should be redirected to when they are not authenticated.
at line 106
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 unauthenticated request handled by this middleware.
at line 114
static void
flushState()
Flush all static state.