Turn on maintenance mode in laravel



Today I will show you how to turn on maintenance mode in laravel. If you are working on your live site and want to turn on maintenance mode in laravel, you just need a command run and done. All this can handle via php artisan commands. You can learn about artisan commands here.

maintenance-mode
Maintenance modeĀ in laravel

Turn on maintenance mode in laravel

You just need to grab your application path where laravel application installed and simply run below command:

php artisan down

Turn off maintenance mode in laravel

You just need to grab your application path where laravel application installed and simply run below command:

php artisan up

Maintenance Mode

In maintenance mode, a custom view will be displayed for all requests into your application. It’s a check is included in the default middleware stack for your application. If application is in maintenance mode, an HttpException will be thrown with a status code of 503.

Default maintenance mode responses template is located in resources/views/errors/503.blade.php. You can change and customize your view.

maintenance mode in laravel
maintenance mode in laravel