From 64b93f7df3fb1622f70bdd652eaa8b3302be5446 Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Sat, 13 Apr 2019 21:54:12 +0800 Subject: [PATCH] Remove unused scripts --- app/Exceptions/Handler.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index e3f9ade..241c0a6 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,11 +2,11 @@ namespace App\Exceptions; +use Log; use Exception; -use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\AuthenticationException; +use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; -use Log; class Handler extends ExceptionHandler { @@ -46,18 +46,6 @@ class Handler extends ExceptionHandler */ public function render($request, Exception $exception) { - /**modified part**/ - if ($request->wantsJson()) { - return response([ - 'success' => false, - 'message' => $e->getMessage() - ], 403); - } - - if ($exception instanceof AuthorizationException) { - \Log::warning("Unauthorized Access or Action \nURL: " . $request->fullUrl() . " \nIP: " . $request->ip() . "\nForm: " . json_encode($request->all()) . "\n"); - return response($exception->getMessage(), 403); - } return parent::render($request, $exception); }