Server IP : 103.191.208.50 / Your IP : 216.73.216.53 Web Server : LiteSpeed System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64 User : celkcksm ( 1031) PHP Version : 7.4.33 Disable Function : show_source, system, shell_exec, passthru, popen, exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/celkcksm/ecampus.ncriptech.com/../hrms.ncriptech.com/app/Exceptions/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php namespace App\Exceptions; use Throwable; use App\Models\Company\Company; use Illuminate\Support\Facades\Schema; use Illuminate\Auth\AuthenticationException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; 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 = [ 'current_password', 'password', 'password_confirmation', ]; /** * Register the exception handling callbacks for the application. * * @return void */ public function register() { $this->reportable(function (Throwable $e) { // }); $this->renderable(function (AuthenticationException $e, $request) { if ($request->is('api/*')) { return response()->json([ 'result' => false, 'message' => 'Unauthenticated.', ], 401); } }); } public function report(Throwable $exception) { if (strpos($exception->getMessage(), "Tenant could not be identified on domain") !== false) { abort(response("Tenant could not be identified on domain, Please update 'APP_DOMAIN' in env file", 404) ); } 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 */ }