haruncpi/laravel-maintenance

支持秘密路由的laravel维护程序

v1.0.0 2020-12-30 04:43 UTC

This package is auto-updated.

Last update: 2024-08-29 05:50:21 UTC


README

适用于Laravel 6/7/5

Laravel的维护模式包,支持秘密路由!

文档

安装

composer require haruncpi/laravel-maintenance

替换 app/Http/Kernel.php 中的中间件

//\App\Http\Middleware\CheckForMaintenanceMode::class,
\Haruncpi\LaravelMaintenance\Middleware\MaintenanceMode::class,

用法

本包支持所有默认的维护模式功能,并通过秘密路由绕过维护模式。

维护绕过 - 秘密路由
php artisan down --secret="mysecretkey"
现在您可以通过秘密路由绕过
https://example.com/mysecretkey

使用这个秘密路由,只有您能访问您的网站在实时模式下,而其他人将看到维护模式。

其他包