CheckForMaintenanceMode
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
Determine if the incoming request has a maintenance mode bypass cookie.
Determine if the request has a URI that should be accessible in maintenance mode.
Redirect the user back to the root of the application with a maintenance mode bypass cookie.
Get the headers that should be sent with the response.
Get the URIs that should be accessible even when maintenance mode is enabled.
Details
void
__construct(Application $app)
Create a new middleware instance.
protected bool
hasValidBypassCookie(Request $request, array $data)
Determine if the incoming request has a maintenance mode bypass cookie.
protected bool
inExceptArray(Request $request)
Determine if the request has a URI that should be accessible in maintenance mode.
protected RedirectResponse
bypassResponse(string $secret)
Redirect the user back to the root of the application with a maintenance mode bypass cookie.
protected array
getHeaders(array $data)
Get the headers that should be sent with the response.
array
getExcludedPaths()
Get the URIs that should be accessible even when maintenance mode is enabled.
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.