laravel / 10 / api / 10.x / illuminate / foundation / http / middleware / checkformaintenancemode.html

CheckForMaintenanceMode

class CheckForMaintenanceMode extends PreventRequestsDuringMaintenance (View source)

Properties

protected Application $app

The application implementation.

from PreventRequestsDuringMaintenance
protected array<int,string> $except

The URIs that should be accessible while maintenance mode is enabled.

from PreventRequestsDuringMaintenance

Methods

void __construct(Application $app)

Create a new middleware instance.

from PreventRequestsDuringMaintenance
mixed handle(Request $request, Closure $next)

Handle an incoming request.

from PreventRequestsDuringMaintenance
bool hasValidBypassCookie(Request $request, array $data)

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

from PreventRequestsDuringMaintenance
bool inExceptArray(Request $request)

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

from PreventRequestsDuringMaintenance
RedirectResponse bypassResponse(string $secret)

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

from PreventRequestsDuringMaintenance
array getHeaders(array $data)

Get the headers that should be sent with the response.

from PreventRequestsDuringMaintenance
array getExcludedPaths()

Get the URIs that should be accessible even when maintenance mode is enabled.

from PreventRequestsDuringMaintenance

Details

void __construct(Application $app)

Create a new middleware instance.

Parameters

Return Value

void

mixed handle(Request $request, Closure $next)

Handle an incoming request.

Parameters

Request $request
Closure $next

Return Value

mixed

Exceptions

HttpException

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

protected array getHeaders(array $data)

Get the headers that should be sent with the response.

Parameters

array $data

Return Value

array

array getExcludedPaths()

Get the URIs that should be accessible even when maintenance mode is enabled.

Return Value

array

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.html