Overview
When your site is in Laravel's maintenance mode, a custom view will be displayed for all requests into your site. This makes it easy to "disable" your site while it is updating or when you are performing maintenance. The logic for this mode is handled in the default middleware.
To enable maintenance mode, run the down
Artisan command:
php artisan down
And to disable maintenance mode, run the reverse up
Artisan command:
php artisan up
Excluding URLs
URLs that should remain "up" while in maintenance mode can be defined in your app/Http/Middleware/PreventRequestsDuringMaintenance.php
file. Assuming your control panel uses the default /cp
URL, use the following config to exclude it:
// app/Http/Middleware/PreventRequestsDuringMaintenance.php protected $except = [ '/cp', '/cp/*'];