icanhazstring/optimus-middleware
Composer 安装命令:
composer require icanhazstring/optimus-middleware
包简介
PSR-15/PSR-7 compliant middleware using jenssegers/optimus
README 文档
README
PSR-15 compliant middleware using jenssegers/optimus
Install
You can install the optimus-middleware library with composer:
$ composer require icanhazstring/optimus-middleware
Configuration
General dependencies
For the middleware to work, your Container needs a dependency to Optimus.
You need to provide an instance with the configuration you need.
How to configure see: https://github.com/jenssegers/optimus
Using expressive
Include the OptimusConfigProvider inside your config/config.php:
$aggregator = new ConfigAggregator([ ... \icanhazstring\Middleware\OptimusConfigProvider::class, ... ]);
Make sure the OptimusConfigProvider is included before your autoload files!
Change decoded attributes
If you want to change the attributes the middleware should decode, simply provide the
OptimusMiddleware::CONFIG_KEY inside your autoload configuration.
return [ \icanhazstring\Middleware\OptimusMiddleware::CONFIG_KEY => ['id'] ];
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-20