定制 rik5/maintenance-mode 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rik5/maintenance-mode

最新稳定版本:v1.0.3

Composer 安装命令:

composer require rik5/maintenance-mode

包简介

A Filament plugin to toggle maintenance mode from the admin panel.

README 文档

README

A Filament plugin to toggle maintenance mode from the admin panel.

This plugin is inspired by Keysaw's Laravel Filament Maintenance.

Installation

Install the package via Composer:

composer require rik5/maintenance-mode

Publish the config file:

php artisan vendor:publish --tag="maintenance-mode-config"

Setup

Add the plugin to your Panel configuration:

use Rik5\MaintenanceMode\MaintenanceModePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            MaintenanceModePlugin::make(),
        ]);
}

Usage

The plugin adds a menu item to the user menu in the Filament admin panel. Clicking it toggles maintenance mode on or off using Laravel's artisan down and up commands.

When enabling maintenance mode, a secret token is generated (or uses the configured one) to bypass the maintenance page.

Configuration

  • secret: Set a custom secret token or leave as null for auto-generated.
  • refresh: Set refresh interval in seconds or false to disable.
  • permissions: Restrict to users with specific permissions.
  • role: Restrict to users with a specific role.
  • custom_view: Use a custom maintenance page with animation (default: true).
  • block_api: Block API endpoints during maintenance (default: false).

API Access During Maintenance

By default, API endpoints (api/*) are accessible even when maintenance mode is enabled. You can change this by setting block_api to true in the config file.

The package automatically replaces Laravel's default maintenance middleware to respect this configuration.

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固