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

@@ -40,7 +40,7 @@ class Companies extends ApiController
// Check if user can access company
$this->canAccess($company);
return $this->response->item($company, new Transformer());
return $this->item($company, new Transformer());
} catch (\Exception $e) {
$this->response->errorUnauthorized($e->getMessage());
}
@@ -56,7 +56,7 @@ class Companies extends ApiController
{
$company = $this->dispatch(new CreateCompany($request));
return $this->response->created(route('api.companies.show', $company->id));
return $this->response->created(route('api.companies.show', $company->id), $this->item($company, new Transformer()));
}
/**