class Illuminate / Foundation / Http / Middleware / PreventRequestsDuringMaintenance

PreventRequestsDuringMaintenance

Properties

protected

$app Application

The application implementation.

Default: null
protected

$except array

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

Default: []

Methods

public

__construct ( Application $app ) : void

Create a new middleware instance.

Parameters

public

handle ( $request , Closure $next ) : mixed

Handle an incoming request.

Parameters

protected

hasValidBypassCookie ( $request , array $data ) : bool

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

Parameters

protected

inExceptArray ( $request ) : bool

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

Parameters

protected

bypassResponse ( string $secret ) : RedirectResponse

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

Parameters

  • $secret string
protected

getHeaders ( $data ) : array

Get the headers that should be sent with the response.

Parameters

  • $data array
public

getExcludedPaths ( ) : array

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