From 32c54c04e487d6306fc5f6130b946fceb9f6f71a Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 17 Jul 2018 17:14:34 +0300 Subject: [PATCH] Check for config:cache --- app/Http/Middleware/StartupCheck.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index 3d33720a89..c153827501 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -60,8 +60,15 @@ class StartupCheck abort(403); } - // Check if a new version was installed - if (! Utils::isNinja()) { + if (Utils::isSelfHost()) { + // Check if config:cache may have been run + if (! env('APP_URL')) { + echo "

There appears to be a problem with your configuration, please check your .env file.

" . + "

If you've run 'php artisan config:cache' you will need to run 'php artisan config:clear'

."; + exit; + } + + // Check if a new version was installed $file = storage_path() . '/version.txt'; $version = @file_get_contents($file); if ($version != NINJA_VERSION) {