定制 digifactory/laravel-partial-down 二次开发

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

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

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

Latest Version on Packagist MIT Licensed GitHub Workflow Status Quality Score StyleCI Total Downloads

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.

统计信息

  • 总下载量: 7.7k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固