point-backend/app/Exceptions/Handler.php
KarimAldeen cf43e0b8d0 Done
2024-04-17 00:25:45 +03:00

34 lines
671 B
PHP

<?php
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];
public function register(): void
{
$this->reportable(function (Throwable $e) {
});
$this->renderable(function (Throwable $e) {
if($e instanceof NotFoundException){
return $e->response();
}
elseif ($e instanceof ServerErrorException) {
return $e->response();
}
});
}
}