From bcaf3593b92dbe1d6cd8e6024a5a8008eee9d0a0 Mon Sep 17 00:00:00 2001 From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com> Date: Mon, 8 Aug 2022 15:30:28 +0200 Subject: [PATCH] Fixed bug "Maintenance Mode while updating" --- routes/web.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/routes/web.php b/routes/web.php index 532def5..f7b3edd 100755 --- a/routes/web.php +++ b/routes/web.php @@ -17,12 +17,8 @@ use App\Http\Controllers\UserController; | */ -// Displays Maintenance Mode page -if(env('MAINTENANCE_MODE') == 'true' or file_exists(base_path("storage/MAINTENANCE"))){ - Route::get('/{any}', function () { - return view('maintenance'); - })->where('any', '.*'); -} else { +// Disables routes if in Maintenance Mode +if(env('MAINTENANCE_MODE') != 'true' and !file_exists(base_path("storage/MAINTENANCE"))){ // Prevents section below from being run by 'composer update' if(file_exists(base_path('storage/app/ISINSTALLED'))){ @@ -164,4 +160,11 @@ Route::get('/updating', function (\Codedge\Updater\UpdaterManager $updater) { }); +// Displays Maintenance Mode page +if(env('MAINTENANCE_MODE') == 'true' or file_exists(base_path("storage/MAINTENANCE"))){ +Route::get('/{any}', function () { + return view('maintenance'); + })->where('any', '.*'); +} + require __DIR__.'/auth.php';