class CheckForMaintenanceMode extends PreventRequestsDuringMaintenance (View source)

Properties

protected Application $app The application implementation. from  PreventRequestsDuringMaintenance
protected array $except The URIs that should be accessible while maintenance mode is enabled. from  PreventRequestsDuringMaintenance

Methods

void
__construct(Application $app)

Create a new middleware instance.

mixed
handle(Request $request, Closure $next)

Handle an incoming request.

bool
hasValidBypassCookie(Request $request, array $data)

Determine if the incoming request has a maintenance mode bypass cookie.

bool
inExceptArray(Request $request)

Determine if the request has a URI that should be accessible in maintenance mode.

bypassResponse(string $secret)

Redirect the user back to the root of the application with a maintenance mode bypass cookie.

Details

void __construct(Application $app)

Create a new middleware instance.

Parameters

Application $app

Return Value

void

mixed handle(Request $request, Closure $next)

Handle an incoming request.

Parameters

Request $request
Closure $next

Return Value

mixed

Exceptions

HttpException
MaintenanceModeException

protected bool hasValidBypassCookie(Request $request, array $data)

Determine if the incoming request has a maintenance mode bypass cookie.

Parameters

Request $request
array $data

Return Value

bool

protected bool inExceptArray(Request $request)

Determine if the request has a URI that should be accessible in maintenance mode.

Parameters

Request $request

Return Value

bool

protected RedirectResponse bypassResponse(string $secret)

Redirect the user back to the root of the application with a maintenance mode bypass cookie.

Parameters

string $secret

Return Value

RedirectResponse