How can we use maintenance mode in Laravel 5?

When an application is in maintenance mode, a custom view is displayed for all requests into the application. It makes it easy to “disable” application while it is updating or performing maintenance. A maintenance mode check is added in the default middleware stack for our application. When an application is in maintenance mode, a MaintenanceModeException will be thrown with a status code of 503.

We can enable or disable maintenance mode in Laravel 5, simply by executing the below command:

// Enable maintenance mode
php artisan down

// Disable maintenance mode
php artisan up