fixed item tax in api
This commit is contained in:
parent
4612f6b35b
commit
b060480179
@ -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());
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user