laravel sanctum 错误自定义返回
现象sanctum 认证失败会自动返回401或419 errercode,前端认证逻辑这里会受到影响,所以希望可以自定义错误返回。解决方法https://laravel.com/docs/8.x/errors#renderable-exceptions在Exception/Handler 里面定义对应AuthenticationException 的渲染方法 public function register() { $this->reportable(fu



