Lumen 8.x 自定义异常请教!
自定义异常文件:App\Exceptions\HandleValidationException
我想拦截App\Exceptions\Handler里的验证异常,然后在HandleValidationException的validationError()处理,请教如何处理?
public function render($request, Throwable $exception)
{
if ($exception instanceof ValidationException){
// 这里面如何吧$exception参数放到validationError($exception)里面?
}
return parent::render($request, $exception);
}
推荐文章: