定制 broken-titan/laravel-idempotency-middleware 二次开发

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

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

broken-titan/laravel-idempotency-middleware

最新稳定版本:v1.1.1

Composer 安装命令:

composer require broken-titan/laravel-idempotency-middleware

包简介

Idempotency middleware for Laravel.

README 文档

README

This package makes it easy to add an indempotentcy to Laravel requests.

Contents

Installation

Install this package with Composer:

composer require broken-titan/laravel-idempotency-middleware

Configuration

There are three configuration values in use which all have defaults. They can be overwritten in config/idempotency.php.

  • idempotency.expiration (default: 1440)
  • idempotency.header (default: "Idempotency-Key")
  • idempotency.methods (default: ["POST"])

You can also pass route-specific parameters in the routes file when setting the middleware.

Usage

For ease of use, it is recommended that you add the middleware in your App\Http\Kernel.php file to $routeMiddleware.

    'idempotency' => \BrokenTitan\Idempotency\Middleware\Idempotency::class

You can set middleware for routes using the standard middleware assignment function.

    Route::apiResource("model", "ModelController", )->middleware("idempotency");

The idempotency middle parameters can be set on a per-route basis, overriding the configuration default.

    Route::apiResource("model", "ModelController", )->middleware("idempotency:X-Custom-Header,POST,100");

Testing

A Docker compose file is included that allows you to run tests for this package.

Security

If you discover any security issues that would affect existing users, please email contact@brokentitan.com instead of using the issue tracker.

Contributing

Feel free to contribute to the package.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固