diff --git a/app/start/global.php b/app/start/global.php index ed0d4425..f66b89c8 100644 --- a/app/start/global.php +++ b/app/start/global.php @@ -53,6 +53,10 @@ App::error(function(Exception $exception, $code) Log::error($exception); }); +API::error(function (\Illuminate\Database\Eloquent\ModelNotFoundException $exception) { + return Response::make(['error' => $exception->getMessage()], 404); +}); + /* |-------------------------------------------------------------------------- | Maintenance Mode Handler