PHPackages                             brickx/laravel-filament-maintenance - 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. brickx/laravel-filament-maintenance

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

brickx/laravel-filament-maintenance
===================================

Simple plugin to toggle maintenance mode from Filament

1.1.2(2y ago)1513.0k1MITPHPPHP ^8.1

Since May 26Pushed 2y ago2 watchersCompare

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

READMEChangelog (5)Dependencies (14)Versions (6)Used By (0)

Filament Maintenance Plugin
===========================

[](#filament-maintenance-plugin)

[![GitHub Tests Action Status](https://camo.githubusercontent.com/1fb36494cbc305b72b557204dcb7bcd302831e295f499d8f89b37c6eba15cc68/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4b65797361772f6c61726176656c2d66696c616d656e742d6d61696e74656e616e63652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473266c6f676f3d476974487562)](https://github.com/Keysaw/laravel-filament-maintenance/actions?query=workflow%3Arun-tests+branch%3Amain)[![Packagist Downloads](https://camo.githubusercontent.com/e0d4c703e945527d0a83b98aa8c56ceb1fe81036346f5bed54c4a02099ac1453/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f627269636b782f6c61726176656c2d66696c616d656e742d6d61696e74656e616e63653f6c6f676f3d5061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d5061636b616769737426636f6c6f723d6f72616e6765)](https://packagist.org/packages/brickx/laravel-filament-maintenance)

> ### ⚠️ IMPORTANT
>
> [](#️-important)
>
> This repository has been **archived**, as a newer version for **Filament v3** can be found here: [Maintenance Switch](https://github.com/Keysaw/maintenance-switch).
>
> I'll try my best to make this new repository compatible with Filament v2 as well, but I can't guarantee when that will happen. Feel free to use this archived version in the meantime.

---

This plugin allows you to easily toggle maintenance mode from your Filament Admin Panel. You can also set a secret token to bypass the maintenance mode.

Requirements
------------

[](#requirements)

This plugin was developed for Filament v2, and will soon be archived.

If you're using Filament v3, please check out the new repository for the plugin: [brickx/maintenance-switch](https://github.com/Keysaw/maintenance-switch).

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

[](#installation)

You can install the package via composer:

```
composer require brickx/laravel-filament-maintenance
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-maintenance-config"
```

This is the contents of the published config file:

```
return [
    'secret' => null,
    'refresh' => false,
    'permissions' => false,
    'role' => false,
    'tiny_toggle' => false,
];
```

You can publish the translations with:

```
php artisan vendor:publish --tag="filament-maintenance-translations"
```

Optionally, you can publish the views using:

```
php artisan vendor:publish --tag="filament-maintenance-views"
```

Setup
-----

[](#setup)

An optional step (but **highly recommended**) is to modify the `App\Http\Middleware\PreventRequestsDuringMaintenance` class to add the following code:

```
use Illuminate\Foundation\Http\MaintenanceModeBypassCookie;
use Illuminate\Http\RedirectResponse;

...

protected function bypassResponse(string $secret) : RedirectResponse
{
    return redirect('admin')->withCookie(
        MaintenanceModeBypassCookie::create($secret)
    );
}
```

This is because Laravel's default maintenance middleware will redirect to the `/` route, which feels weird for the user. Of course, you can redirect to any URL you want.

Usage
-----

[](#usage)

The plugin will add a toggle button to your Filament Admin Panel, right before the search bar.

Clicking it will trigger the `php artisan down` command if the website is live, and the `php artisan up` command otherwise.

### Secret Token

[](#secret-token)

You can set a secret token in the config file. If you do so, you will be able to bypass the maintenance mode by visiting the following URL: `https://your-domain.test/{secret}`.

If the `secret` key is set to `null`, a random one will be generated on the fly each time the maintenance mode is activated.

### Refresh Interval

[](#refresh-interval)

If you want to instruct browsers to refresh pages after a certain amount of time, you can set the `refresh` key in the config file.

When set to `false`, no `Refresh` HTTP header will be sent. You can specify an integer to define the number of seconds before reloading pages under maintenance mode.

### Visibility

[](#visibility)

By default, any logged-in user will be able to toggle the maintenance mode.

If you want to restrict maintenance mode toggling to certain users, you can set the `permissions` key in the config file.

The plugin will use Laravel's default authorization system to check for permissions, via the `can` method on the User model. It will also work well with [Spatie's Laravel Permission](https://spatie.be/docs/laravel-permission/v5/introduction) package.

Todo
----

[](#todo)

- Fix toggle button styling not properly updating when maintenance mode is disabled.
- Improve the UX by directly adding the maintenance cookie from the Livewire component (instead of redirecting to the matching URL).

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Keysaw](https://github.com/Keysaw)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.8% 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 ~4 days

Total

5

Last Release

1063d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64f70e0332022e49d340fe940d6ee83fd70bb597343580c40308bae6e5d5e028?d=identicon)[Keysaw](/maintainers/Keysaw)

---

Top Contributors

[![Keysaw](https://avatars.githubusercontent.com/u/22835200?v=4)](https://github.com/Keysaw "Keysaw (57 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![a21ns1g4ts](https://avatars.githubusercontent.com/u/11599205?v=4)](https://github.com/a21ns1g4ts "a21ns1g4ts (2 commits)")

---

Tags

filamentlaravelmaintenancelaravelmaintenancefilamentbrickx

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/brickx-laravel-filament-maintenance/health.svg)

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

###  Alternatives

[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)[tapp/filament-google-autocomplete-field

Filament plugin that provides a Google Autocomplete field

3098.1k](/packages/tapp-filament-google-autocomplete-field)

PHPackages © 2026

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