From 9bd367d644139ee88923787532ce07c70dcb33ec Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Fri, 15 Jan 2021 17:24:58 -0700 Subject: [PATCH] support pre-rendering maintenance page --- public/index.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/public/index.php b/public/index.php index 233cba74..796d2902 100644 --- a/public/index.php +++ b/public/index.php @@ -7,6 +7,21 @@ */ define('LARAVEL_START', microtime(true)); +/* +|-------------------------------------------------------------------------- +| Check If Application Is Under Maintenance +|-------------------------------------------------------------------------- +| +| If the application is maintenance / demo mode via the "down" command we +| will require this file so that any pre-rendered template can be shown +| instead of starting the framework, which could cause an exception. +| +*/ + +if (file_exists(__DIR__ . '/../storage/framework/maintenance.php')) { + require __DIR__ . '/../storage/framework/maintenance.php'; +} + /* |-------------------------------------------------------------------------- | Register The Auto Loader