diff --git a/src/GrocyClient.php b/src/GrocyClient.php index 87d5b13..78275b8 100644 --- a/src/GrocyClient.php +++ b/src/GrocyClient.php @@ -99,7 +99,8 @@ class GrocyClient $array = $this->client->get(sprintf('objects/%s', $entity), compact('order', 'limit', 'offset')); $objects = []; foreach ($array as $rawObject) { - $objects[] = ObjectTransformer::denormalize($rawObject, $entity); + $object = ObjectTransformer::denormalize($rawObject, $entity); + $objects[$object->getId()] = $object; } return $objects;