class AuthenticationException extends Exception (View source)

Properties

protected array $guards

All of the guards that were checked.

protected string|null $redirectTo

The path the user should be redirected to.

static protected callable $redirectToCallback

The callback that should be used to generate the authentication redirect path.

Methods

void
__construct(string $message = 'Unauthenticated.', array $guards = [], string|null $redirectTo = null)

Create a new authentication exception.

array
guards()

Get the guards that were checked.

string|null
redirectTo(Request $request)

Get the path the user should be redirected to.

static void
redirectUsing(callable $redirectToCallback)

Specify the callback that should be used to generate the redirect path.

Details

void __construct(string $message = 'Unauthenticated.', array $guards = [], string|null $redirectTo = null)

Create a new authentication exception.

Parameters

string $message
array $guards
string|null $redirectTo

Return Value

void

array guards()

Get the guards that were checked.

Return Value

array

string|null redirectTo(Request $request)

Get the path the user should be redirected to.

Parameters

Request $request

Return Value

string|null

static void redirectUsing(callable $redirectToCallback)

Specify the callback that should be used to generate the redirect path.

Parameters

callable $redirectToCallback

Return Value

void

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.