Laravel 8.x Refresh Maintenance Mode Page Automatically

Hello Artisan

Laravel maintenance mode is the todays tutorial for you. In this tutorial i am going to share laravel maintenance mode with details. You know that Laravel has these cool feature using which you can put your website in maintenance mode in some cases. To do so we have to run just one artisan command like below:

php artisan down

 

When you will execute these above command then your website in maintenance mode, it will render the following 500 page. Now, this is ok for some times but in an ideal scenario, you wouldn’t want to put your website in maintenance mode for a long period, right?. We might want to let the end users know that the site is now up when you run php artisan up

php artisan up

 

--refresh

The recent merge request and release of Laravel 8.x has introduced this feature which lets you do just the same. To make this work, you need to pass in a --refresh option to the php artisan down command.

php artisan down --refresh=60

 

Here, we passed in 60 to the --refresh option. When you have been doing so, a Refresh HTTP header will be sent with this maintenance mode responses forcing the browser to refresh after 60 seconds. Hope it can help you.

 

Facebook Github
A web enthusiastic, a self-motivated full-stack software engineer from Dhaka, Bangladesh with experience in developing applications using Laravel , React and Vue js