$api->version('v1', ['middleware' => 'api.throttle'], function ($api) {
// Routes within this version group will require authentication.
});
直接用api.throttle的中间件,会报个错
{
"message": "Call to undefined method Closure::match()",
"code": 1,
"status_code": 500,
"debug": {
"line": 161,
"file": "C:\\web\\backpacker\\vendor\\dingo\\api\\src\\Http\\RateLimit\\Handler.php",
"class": "Symfony\\Component\\Debug\\Exception\\FatalErrorException",
"trace": [ "#0 {main}" ]
}
}
我猜想是kenerl文件下面没有注册这条路由,但是不知道是不是,怎么解决