Closed krissss closed 1 year ago
针对 #58 可以使用如下形式:
\Webman\Route::post('/demo', [\app\controller\DemoController::class, 'index'])
->middleware([
new \app\middleware\ThrottlerMiddleware(60, 2),
new \app\middleware\AuthMiddleware('admin'),
]);
大赞 👍
提供 middleware 的多种注入形式
使用举例:
middleware
route