Smauel
2019-04-18 20:45
Argument 1 passed to Illuminate\Routing\Middleware\ThrottleRequests::addHeaders() must be an instance of Symfony\Component\HttpFoundation\Response, string given, called in D:\blog\vendor\laravel\framework\src\Illuminate\Routing\Middleware\ThrottleRequests.php on line 62
jwtmiddle是怎么写的呢,看这个报错应该是在下一层的中间件报错了
public function jsonSuccessData($data = []){ return $this->jsonResponse(0,'Success',$data); } public function jsonResponse($code,$message,$data){ $content = [ 'code'=>$code, 'msg'=>$message, 'data'=>$data, ]; return response()->json($content); }
public function jsonSuccessData($data = []){ return $this->jsonResponse(0,'Success',$data); } public function jsonResponse($code,$message,$data){ $content = [ 'code'=>$code, 'msg'=>$message, 'data'=>$data, ]; return response()->json($content); }
和老师的一样,postman测试user/login是正确的,到user/info就报错了
PHP开发APP接口
18130 学习 · 56 问题
相似问题