digifactory/laravel-partial-down
最新稳定版本:v2.0.1
Composer 安装命令:
composer require digifactory/laravel-partial-down
包简介
Put specific parts of your application in maintenance mode using
README 文档
README
This package provides a command to put a part of your application's routes in maintenance mode. This only affects your HTTP routes, so queues and scheduled tasks will run.
Installation
You can install the package via Composer:
composer require digifactory/laravel-partial-down
Usage
You can define the parts you want to put in maintenance mode in your middlewares you use for a route or group:
Route::group(['prefix' => 'backend', 'middleware' => 'partialDown:backend'], function () { }); Route::get('backend', function () { })->middleware('partialDown:backend');
Now you can use the artisan commands to put this part of your application in maintenance mode:
php artisan partial-down backend
And partial-up to bring it back online:
php artisan partial-up backend
The partial-down command has Laravel's down command signature:
protected $signature = 'partial-down {part} {--message= : The message for the maintenance mode} {--retry= : The number of seconds after which the request may be retried} {--allow=* : IP or networks allowed to access the application while in maintenance mode}';
When a specific part is down and the IP is not allowed an MaintenanceModeException will be thrown, by default Laravel handles this exception with a 503 response. You can customize this, please refer the Laravel documentation for more information.
List used parts
In large applications it can be cumbersome to find all used application parts. You can use the php artisan partial-parts command to view all used parts:
php artisan partial-parts
+--------------+
| Parts in use |
+--------------+
| backend |
| frontend |
+--------------+
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email helpdesk@digifactory.nl instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.
digifactory/laravel-partial-down 适用场景与选型建议
digifactory/laravel-partial-down 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.7k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2020 年 06 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「digifactory」 「partial-down」 「laravel down partial」 「laravel down part」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 digifactory/laravel-partial-down 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 digifactory/laravel-partial-down 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 digifactory/laravel-partial-down 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Fixes your uploaded SVG files before validating through the Laravel validator
Pull your production storage folder and database to your local environment
Easily deal with cookie consent in your Laravel applications
Allow all e-mail addresses for a specific domain name to login to a generic account for that domain.
Alfabank REST API integration
Laravel package for Accurate Online API integration.
统计信息
- 总下载量: 7.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-17