From c7fd49e553dbefeac7906a752702ab052916d3fb Mon Sep 17 00:00:00 2001 From: Rev Date: Mon, 11 Oct 2021 17:34:51 +0900 Subject: [PATCH] add the locale to the search result --- app/Data/ItemsCollection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Data/ItemsCollection.php b/app/Data/ItemsCollection.php index d339982..6bbc9da 100644 --- a/app/Data/ItemsCollection.php +++ b/app/Data/ItemsCollection.php @@ -45,6 +45,7 @@ class ItemsCollection return [ '_id' => $item['_id'], '_name' => $item['_name'], + 'locale' => $this->locale[$item['_id']] ?? '' ]; })->values(); } @@ -59,7 +60,6 @@ class ItemsCollection $item = $this->items[$id] ?? throw new ItemNotFoundException('Item not found'); return [ 'item' => $item, - 'locale' => $this->locale[$id] ?? '' ]; } }