在微信公众号需要填写配置信息,网页授权域名、业务域名
$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文件下面没有注册这条路由,但是不知道是不是,怎么解决
dingo返回的是422 ,500是服务器上面的错误,估计是dingo配错了吧,我按照github上的dingo配的没问题
{
"message": "手机号格式错误",
"errors": {
"phone": [
"手机号格式错误"
],
"password": [
"密码最少6个字符串"
]
},
"status_code": 422
}