From 8b5401d99276ef2b31d58ae49c0c923253f5f349 Mon Sep 17 00:00:00 2001 From: Moamen Eltouny <16774083+MoamenEltouny@users.noreply.github.com> Date: Mon, 15 Aug 2022 12:31:24 +0200 Subject: [PATCH] Fix auth exception --- src/Exceptions/ExceptionHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exceptions/ExceptionHandler.php b/src/Exceptions/ExceptionHandler.php index 81c92e1..061d4eb 100644 --- a/src/Exceptions/ExceptionHandler.php +++ b/src/Exceptions/ExceptionHandler.php @@ -50,7 +50,7 @@ public function render($request, Throwable $e) if ($trans == 'auth.unauthenticated') $trans = null; return $this->shouldReturnJson($request, $e) - ? json()->exception($e, null, $trans, 401) + ? json()->exception($e, null, $trans, [], 401) : redirect()->guest($e->redirectTo() ?? route('login')); } elseif ($e instanceof ValidationException) { return $this->convertValidationExceptionToResponse($e, $request);