Skip to content

Commit bcaf359

Browse files
committed
Fixed bug "Maintenance Mode while updating"
1 parent edc2f54 commit bcaf359

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

routes/web.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@
1717
|
1818
*/
1919

20-
// Displays Maintenance Mode page
21-
if(env('MAINTENANCE_MODE') == 'true' or file_exists(base_path("storage/MAINTENANCE"))){
22-
Route::get('/{any}', function () {
23-
return view('maintenance');
24-
})->where('any', '.*');
25-
} else {
20+
// Disables routes if in Maintenance Mode
21+
if(env('MAINTENANCE_MODE') != 'true' and !file_exists(base_path("storage/MAINTENANCE"))){
2622

2723
// Prevents section below from being run by 'composer update'
2824
if(file_exists(base_path('storage/app/ISINSTALLED'))){
@@ -164,4 +160,11 @@
164160

165161
});
166162

163+
// Displays Maintenance Mode page
164+
if(env('MAINTENANCE_MODE') == 'true' or file_exists(base_path("storage/MAINTENANCE"))){
165+
Route::get('/{any}', function () {
166+
return view('maintenance');
167+
})->where('any', '.*');
168+
}
169+
167170
require __DIR__.'/auth.php';

0 commit comments

Comments
 (0)