point-backend/app/Exceptions/Handler.php
2024-04-03 12:10:28 +03:00

32 lines
594 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',
NotFoundException::class,
];
public function register(): void
{
$this->reportable(function (Throwable $e) {
});
$this->renderable(function (Throwable $e) {
if($e instanceof NotFoundException){
return $e->response();
}
});
}
}