When a model cannot be found, the following 404 page is shown:
Sorry, the page you are looking for could not be found.
In order to debug which model, edit app/Exceptions/Handler.php:
public function render($request, Throwable $e) {
if ($e instanceof ModelNotFoundException && Config::get('app.debug') === true) {
return response()->json(['error' => $e->getMessage()]);
}
return parent::render($request, $e);
}
Categorieën
Laravel