PHPackages                             mahmud/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. mahmud/maintenance-mode

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

mahmud/maintenance-mode
=======================

Put your application down and browse in dev mode.

v1.0(8y ago)31.8k↓100%MITPHPPHP &gt;=5.6.4

Since May 24Pushed 8y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Laravel Maintenance Mode
------------------------

[](#laravel-maintenance-mode)

[![Build Status](https://camo.githubusercontent.com/c27a457659b89ee4f1f80f7995c559dd37f2051bde7167ad25791e5c5c92cc8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d70617373696e672d627269676874677265656e2e737667)](https://packagist.org/packages/mahmud/maintenance-mode)[![Packagist Version](https://camo.githubusercontent.com/9027aa3314bafc3b02505019c71746e14aac0112f9c9fbe35472fce188d7b10b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61686d75642f6d61696e74656e616e63652d6d6f64652e737667)](https://packagist.org/packages/mahmud/maintenance-mode)[![Downloads](https://camo.githubusercontent.com/329a61f79c370d769fbf6c286181fd38c231a28469182b4c43fc2b2bcd4ada25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61686d75642f6d61696e74656e616e63652d6d6f64652e737667)](https://packagist.org/packages/mahmud/maintenance-mode)[![License](https://camo.githubusercontent.com/b5130675b2587c7cb2ae1d687f0d4d903e762801ec62687dad3b07900f0927a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d61686d75642f6d61696e74656e616e63652d6d6f64652e737667)](https://packagist.org/packages/mahmud/maintenance-mode)

Put your application down and browse in dev mode.

[![Screenshot](https://cloud.githubusercontent.com/assets/5725014/26293038/a4619f42-3edc-11e7-9f5c-ef8ad3529184.jpg)](https://cloud.githubusercontent.com/assets/5725014/26293038/a4619f42-3edc-11e7-9f5c-ef8ad3529184.jpg)

Installation
------------

[](#installation)

1. Install package through composer

```
composer require mahmud/maintenance-mode
```

Or add dependency to `composer.json` file

```
{
    "require": {
        "mahmud/maintenance-mode": "^1.0"
    }
}
```

2. Add Service Provider to `providers` array in `config/app.php`

```
'providers' =>  [
    \Mahmud\MaintenanceMode\MaintenanceModeServiceProvider::class,
]
```

3. Add the following Middleware in middleware array in app/Http/Kernel.php

```
protected $middleware = [
    \Mahmud\MaintenanceMode\Middleware\MaintenanceModeMiddleware::class,
];

```

4. Publish resources by this command

```
php artisan vendor:publish --tag=maintenance-mode --force
```

5. Add `APP_STATUS` and `UP_TIME` to your `.env` file

```
APP_STATUS=down
UP_TIME='2017-05-19 23:30:15'
```

Usage
-----

[](#usage)

### .env

[](#env)

Set `APP_STATUS` in your `.env` file. Possible values are `up` and `down`. Set app status to `down` when you want to go for maintenance. And Also set `UP_TIME` when your application will be up. `UP_TIME` format is `'YYYY-MM-DD hh:mm:ss'`.

> `UP_TIME` has no effect when `APP_STATUS=up`

### Dev Mode

[](#dev-mode)

You can access you app when it is in maintenance mode. To access you must visit your site with query param `mode=dev`The URL will be

```
http://your-site.com?mode=dev

```

Once you browse like this you can browse for the next few minutes specified in [cookie\_exp\_min](https://github.com/mahmudkuet11/laravel-maintenance-mode/tree/dev#cookie_exp_min)

### Configuration

[](#configuration)

To change configuration go to `config/maintenance-mode.php`. Available configurations are listed below.

#### app\_status

[](#app_status)

This is the status of your app. Possible value are: `down` | `up` . When you start maintenance work, you should set the status to `down`. You can also set the status from .env file. Just set `APP_STATUS=down` in your environment.

#### up\_time

[](#up_time)

You should set time when your application will be up. You can set up time from `.env` file by setting `UP_TIME='YYYY-MM-DD hh:mm:ss'` in this format.

#### cookie\_exp\_min

[](#cookie_exp_min)

Dev mode will be expired after specified minutes. After being expired user should visit the site with mode=dev query param to start dev session again.

#### down\_status\_code

[](#down_status_code)

This status code will be send with the header when you app is down.

#### app\_down\_msg

[](#app_down_msg)

This message will be sent as a response when client sent AJAX request to the app. Response will be in JSON format where key is `error` and value is the message. For example:

```
[
    'error' =>  'Application is down for maintenance'
]
```

#### view

[](#view)

This view is returned when your application is down. You can set a custom view by specifying the view path here. i.e.

```
[
    'view'  =>  'public.errors.custom_view'
]
```

when you view path is `resources/views/public/errors.custom_view.blade.php`

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3273d ago

### Community

Maintainers

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

---

Top Contributors

[![mahmudkuet11](https://avatars.githubusercontent.com/u/5725014?v=4)](https://github.com/mahmudkuet11 "mahmudkuet11 (25 commits)")

---

Tags

dev-modedownlaravelmaintenance-mode

### Embed Badge

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

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

###  Alternatives

[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37345.5k](/packages/beyondcode-laravel-favicon)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)

PHPackages © 2026

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