PHPackages                             canhph2/laravel-maintenance-mode - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. canhph2/laravel-maintenance-mode

ActiveLibrary

canhph2/laravel-maintenance-mode
================================

A custom maintenance mode for Laravel (JSON response support).

v1.1.1(1y ago)044MITPHPPHP ^7.2

Since May 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/canhph2/laravel-maintenance-mode)[ Packagist](https://packagist.org/packages/canhph2/laravel-maintenance-mode)[ RSS](/packages/canhph2-laravel-maintenance-mode/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel maintenance mode
========================

[](#laravel-maintenance-mode)

- A custom maintenance mode for Laravel (JSON response support).

How to install
--------------

[](#how-to-install)

- required `PHP >= 7.2`, `Laravel >= 5.8`

```
composer require canhph2/laravel-maintenance-mode

```

How to configure
----------------

[](#how-to-configure)

In `app/Http/Kernel.php`, add this `middleware` in `$middleware array`

- \[Required\] Put `MaintenanceModeMiddleware::class` below `\Spatie\Cors\Cors::class` (should be **2nd item**)
- \[Required\] Don't use `Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode`

```
// 2nd, should below `Cors` and don't use 'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode'
\CongnqNexlesoft\MaintenanceMode\Http\Middleware\MaintenanceModeMiddleware::class,
```

Response
--------

[](#response)

### Features:

[](#features)

- **Using JSON response**
- **Except URIs**
- Require config the line below to your `.env` file

```
## [BEGIN] canhph2/laravel-maintenance-mode, lumen-maintenance-mode, symfony-maintenance-mode ##
MAINTENANCE_RESPONSE_FORMAT=json
#    separate by ,(comma)
EXCEPT_URIS=URI_1,URI_2
## [END] canhph2/laravel-maintenance-mode, lumen-maintenance-mode, symfony-maintenance-mode ##
```

### Using View

[](#using-view)

- Copy these files to your project (if):

```
resources/views/errors/503.blade.php
storage/framework/.gitignore

```

Put the application into maintenance mode (default in Laravel).
---------------------------------------------------------------

[](#put-the-application-into-maintenance-mode-default-in-laravel)

```
php artisan down
```

Bring the application out of maintenance mode (default in Laravel).
-------------------------------------------------------------------

[](#bring-the-application-out-of-maintenance-mode-default-in-laravel)

```
php artisan up
```

---

DevOps
------

[](#devops)

### Release a new version

[](#release-a-new-version)

```
sh .ops/release-a-new-version.sh
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance40

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~326 days

Total

2

Last Release

394d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9e829ae3ec536bc841a14c0baf5724b23942b6433f9f82411f7cfad2d597926?d=identicon)[canhph2](/maintainers/canhph2)

---

Top Contributors

[![canhph2](https://avatars.githubusercontent.com/u/184184743?v=4)](https://github.com/canhph2 "canhph2 (2 commits)")

---

Tags

laravelmaintenancemodeJSON-response-support

### Embed Badge

![Health badge](/badges/canhph2-laravel-maintenance-mode/health.svg)

```
[![Health](https://phpackages.com/badges/canhph2-laravel-maintenance-mode/health.svg)](https://phpackages.com/packages/canhph2-laravel-maintenance-mode)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
