class RedirectIfAuthenticated (View source)

Properties

static protected callable|null $redirectToCallback

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

Methods

static string
using(string $guard, string ...$others)

Specify the guards for the middleware.

Response
handle(Request $request, Closure $next, string ...$guards)

Handle an incoming request.

string|null
redirectTo(Request $request)

Get the path the user should be redirected to when they are authenticated.

string
defaultRedirectUri()

Get the default URI the user should be redirected to when they are authenticated.

static void
redirectUsing(callable $redirectToCallback)

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

Details

static string using(string $guard, string ...$others)

Specify the guards for the middleware.

Parameters

string $guard
string ...$others

Return Value

string

Response handle(Request $request, Closure $next, string ...$guards)

Handle an incoming request.

Parameters

Request $request
Closure $next
string ...$guards

Return Value

Response

protected string|null redirectTo(Request $request)

Get the path the user should be redirected to when they are authenticated.

Parameters

Request $request

Return Value

string|null

protected string defaultRedirectUri()

Get the default URI the user should be redirected to when they are authenticated.

Return Value

string

static void redirectUsing(callable $redirectToCallback)

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

Parameters

callable $redirectToCallback

Return Value

void