how to create custom maintenance page in laravel 9

In this section we will see how to create custom 503 maintenance mode page in laravel 9. Before we start you can check previous blog.

How to Use Maintenance Mode in Laravel 9


Run Laravel Maintenance Command

php artisan down

Create Maintenance page in Laravel App

You may customize the default maintenance mode template by defining your own template at resources/views/errors/503.blade.php.

resources/views/errors/503.blade.php

laravel 9 create 503 page

laravel 9 create 503 page

Next, you can add html css or tailwind maintenance page code put in 503.blade.php and You can also read

Tailwind CSS Maintenance Page Example

503.blade.php

<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Laravel Custom 503 Maintenance Page Example</title>
    <script src="https://cdn.tailwindcss.com"></script>
  </head>

  <body>
    <div class="flex items-center justify-center h-screen">
      <div class="flex flex-col items-center justify-center max-w-lg">
        <div class="mb-4">
          <h1 class="text-5xl font-extrabold text-blue-600">503</h1>
        </div>
        <h3 class="mb-3 text-2xl font-bold text-center text-gray-700">
          Temporarily down for maintenance
          We’ll be back soon!
        </h3>
        <p class="text-sm text-center text-gray-600">
          Sorry for the inconvenience but we’re performing some maintenance at the moment.
          If you need to you can always <a class="text-blue-600 hover:underline">Contact us </a>, otherwise
          we’ll be back online shortly!
          — The Team
        </p>
      </div>
    </div>
  </body>

</html>
laravel 9 create custom 503 maintenance page

laravel 9 create custom 503 maintenance page


Remove maintenance page

php artisan up


Read Also

Laravel 9 create custom 404 error page example