Support the ongoing development of →
posted 7 years ago
Last updated 2 years ago.

i don't think you need a custom handler, since if you check the app\bootstrap\app.php you'll find a singleton bound to the App\Exceptions\Handler::class where in the render method you could handle everything.

add you exception class to the protected $dontReport array

and in the render method do something like

if ($e instanceof ModelNotFoundException) {
    $e = new NotFoundHttpException($e->getMessage(), $e);
Last updated 7 years ago.

I can't find any instance of a handle() method in any of the classes relevant to the App\Exceptions\Handler::class. Where can I find this method?

Last updated 7 years ago.

i meant the render method, there's not handle method. sorry


Sign in to participate in this thread!


Your banner here too?

VenomRush venomrush Joined 27 May 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.