yuriitatur/pipeline
最新稳定版本:v1.0.0
Composer 安装命令:
composer require yuriitatur/pipeline
包简介
A simple pipeline for running middleware
关键字:
README 文档
README
Simple middleware pipe | refined Laravel's pipes
Installation
composer require yuriitatur/pipeline
Usage
class AuthMiddleware implements MiddlewareInterface
{
public function handle(&$request, \Closure $next, ...$roles): mixed
{
#...do some magic
}
}
$pipe = new Pipeline();
$response = $pipe->send($request)
->through(new AuthMiddleware, 'admin', 'super_admin')
->through(new SomeOtherMiddleware)
->then(function($request){
#...handle the request
});
Testing
composer test
License
This code is under MIT license, read more in the LICENSE file.
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-04