From bf5563a77b487aca6238f643554d3f8049d9d124 Mon Sep 17 00:00:00 2001 From: Jiannei Date: Mon, 20 Sep 2021 15:54:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BC=82=E5=B8=B8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Support/Traits/ExceptionTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Support/Traits/ExceptionTrait.php b/src/Support/Traits/ExceptionTrait.php index 4462c0b..dd5940c 100644 --- a/src/Support/Traits/ExceptionTrait.php +++ b/src/Support/Traits/ExceptionTrait.php @@ -65,7 +65,7 @@ protected function buildFailedValidationResponse(Request $request, array $errors return Response::fail( is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage, - Arr::get(Config::get('response.exception'), ValidationException::class, 422), + Arr::get(Config::get('response.exception'), ValidationException::class.'.code', 422), $errors ); } @@ -81,7 +81,7 @@ protected function invalidJson($request, ValidationException $exception) { return Response::fail( $exception->validator->errors()->first(), - Arr::get(Config::get('response.exception'), ValidationException::class, 422), + Arr::get(Config::get('response.exception'), ValidationException::class.'.code', 422), $exception->errors() ); }