From bc9e148916a95af1d79f4f9e5087c43f16d8b561 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Sat, 5 Dec 2020 13:01:48 +0800 Subject: [PATCH] x1 and x2 reports --- app/Exceptions/Handler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 14f9d193..909c4a89 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -59,7 +59,9 @@ class Handler extends ExceptionHandler } if ($exception instanceof AuthorizationException) { - return response()->redirectTo('/'); + return response()->json([ + 'error' => 'Resource not found' + ], 404); } return parent::render($request, $exception);