fixed item tax in api

This commit is contained in:
Denis Duliçi 2021-01-02 11:53:48 +03:00
parent 4612f6b35b
commit b060480179
2 changed files with 2 additions and 2 deletions

View File

@ -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());
}

View File

@ -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());
}
/**