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. [Utility &amp; Helpers](/categories/utility)
4. /
5. canhph2/laravel-maintenance-mode

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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

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

v1.1.1(2y 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 today

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

23

—

LowBetter than 26% of packages

Maintenance34

Infrequent updates — may be unmaintained

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

445d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/184184743?v=4)[canhph2](/maintainers/canhph2)[@canhph2](https://github.com/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

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[firefly-iii/data-importer

Firefly III Data Import Tool.

8035.8k](/packages/firefly-iii-data-importer)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[ronasit/laravel-helpers

Provided helpers function and some helper class.

2085.6k31](/packages/ronasit-laravel-helpers)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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