Authenticate
class Authenticate implements AuthenticatesRequests (View source)
Properties
| protected Factory | $auth | The authentication factory instance. |
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.
Details
void
__construct(Factory $auth)
Create a new middleware instance.
static string
using(string $guard, string ...$others)
Specify the guards for the middleware.
protected void
authenticate(Request $request, array $guards)
Determine if the user is logged in to any of the given guards.
protected void
unauthenticated(Request $request, array $guards)
Handle an unauthenticated user.
protected string|null
redirectTo(Request $request)
Get the path the user should be redirected to when they are not authenticated.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.