Hi artisan, in this tutorial, we are going to create our custom maintenance page in Laravel. I’m testing on Laravel 7.x. Let’s get started:
Table of Contents
Create Laravel Project
Run this composer command to create Laravel project. If you already have Laravel project, then you can skip this step.
composer create-project --prefer-dist laravel/laravel laratest
To put website into maintenance mode, we have to run this command:
php artisan down
Application is now in maintenance mode.
To make application up and running again, run this command:
php artisan up
Application is now live.
Laravel displays 503 page as maintenance page. We can easily override the page. Navigate to resources/views folder and create a directory called errors. Under errors folder, create a file named
503.blade.php & paste your design:
That’s it. Thanks for reading. 🙂
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Maintenance Mode</title> </head> <body> <div class="container"> <div style="margin-top: 50px; text-align: center"> We will be up in couple of minutes. Thanks for patience. </div> </div> </body> </html>