the question is simple. Using laravel 5.6
I have for example, this route
Route::get('/services/{id}/{service}', ['as'=> 'services.show', 'uses' => 'ServicesController@show']);
where inside controller I do some fancy logic.
the question is: is there any other elegant way to throw a 404 when something fails inside the controller rather than the typical ErrorException page from laravel? (this is not the 404).
An easy example could be the id is not inserted in the database, so that is making the app fails, not returning a 404.
I guess one solution should be insert a try catch condition and if it fails render(404).. more or less..