Turn on maintenance mode in laravel

Rakesh Sharma      No Comments  

Turn on maintenance mode in laravel using artisan commands

Turn on maintenance mode in laravel

If you are working with laravel. There is all hard task you can do simply. That’s why i like laravel. A simple example of it’s simplicity, 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. This all handle via php artisan commands. You can learn about artisan commands here. Let’s see how to turn on maintenance mode in laravel.

artisan-down-up

Turn on maintenance mode in laravel

Just grab you application path where laravel application installed and simply run below command.

php artisan down

Turn off maintenance mode in laravel

Just grab you 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 the application is in maintenance mode, an HttpException will be thrown with a status code of 503. For more about laravel maintenance mode follow Official Docs.

Maintenance Mode Response Template

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