Custom Missing Model handler in Laravel Implicit Binding or how to catch ModelNotFoundException in Laravel 9

While developing backend part in my current project I facing a problem with customizing “missing model” logic in Laravel Implicit Binding. Of course, we’ve Missing Model Behavior from documentaion, but I’ve lots of routes with groups – so it’ll not very suitable method. I spent hours digging the solution and finally want to share it with you.