Index all obects by id
This commit is contained in:
parent
653744b751
commit
4dd7ecd030
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user