F
Filament11mo ago
ericmp

Catching Laravel 404 exception doesnt work as expected?

app\Exceptions\Handler.php
public function render($request, Throwable $exception)
{
if ($exception instanceof NotFoundHttpException) {

dd('hi');
return to_route('filament.admin.pages.dashboard');
}
dd('wtf', $exception->getCode(), $exception);
public function render($request, Throwable $exception)
{
if ($exception instanceof NotFoundHttpException) {

dd('hi');
return to_route('filament.admin.pages.dashboard');
}
dd('wtf', $exception->getCode(), $exception);
i expect to see 'hi' but i see this:
No description
1 Reply
ericmp
ericmpOP11mo ago
ModelNotFoundException doesn't inherit NotFoundHttpException i see hmmm i want to catch all 404s, but the code for ModelNotFoundException is not 404 🤔
Want results from more Discord servers?
Add your server