x1 and x2 reports

This commit is contained in:
omair saleh
2020-12-05 12:58:09 +08:00
parent cda0f5fe0f
commit dbdaaf7752
+4 -2
View File
@@ -3,6 +3,8 @@
namespace App\Exceptions;
use Exception;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
@@ -56,8 +58,8 @@ class Handler extends ExceptionHandler
], 404);
}
if ($exception->getCode() === 403) {
return redirect('/');
if ($exception instanceof AuthorizationException) {
return 'test';
}
return parent::render($request, $exception);