diff --git a/app/Http/Controllers/Api/Common/Items.php b/app/Http/Controllers/Api/Common/Items.php index a9f5287c6..b8eabde3b 100644 --- a/app/Http/Controllers/Api/Common/Items.php +++ b/app/Http/Controllers/Api/Common/Items.php @@ -22,7 +22,7 @@ class Items extends ApiController */ public function index() { - $items = Item::with('category', 'tax')->collect(); + $items = Item::with('category', 'taxes')->collect(); return $this->response->paginator($items, new Transformer()); } diff --git a/app/Transformers/Common/Item.php b/app/Transformers/Common/Item.php index a541c6baa..873d877d9 100644 --- a/app/Transformers/Common/Item.php +++ b/app/Transformers/Common/Item.php @@ -46,7 +46,7 @@ class Item extends TransformerAbstract return $this->null(); } - return $this->item($model->taxes, new Tax()); + return $this->collection($model->taxes, new Tax()); } /**