Changed api show and store method..

This commit is contained in:
Cüneyt Şentürk
2021-05-30 02:43:12 +03:00
parent 78016a1a94
commit dd9a10febd
18 changed files with 38 additions and 38 deletions

View File

@ -34,7 +34,7 @@ class Items extends ApiController
{
$item = Item::with('category', 'taxes')->find($id);
return $this->response->item($item, new Transformer());
return $this->item($item, new Transformer());
}
/**
@ -47,7 +47,7 @@ class Items extends ApiController
{
$item = $this->dispatch(new CreateItem($request));
return $this->response->created(route('api.items.show', $item->id));
return $this->response->created(route('api.items.show', $item->id), $this->item($item, new Transformer()));
}
/**