replace url to route
This commit is contained in:
@ -56,7 +56,7 @@ class Companies extends ApiController
|
||||
{
|
||||
$company = $this->dispatch(new CreateCompany($request));
|
||||
|
||||
return $this->response->created(url('api/companies/' . $company->id));
|
||||
return $this->response->created(route('api.companies.show', $company->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,7 +67,7 @@ class Contacts extends ApiController
|
||||
{
|
||||
$contact = $this->dispatch(new CreateContact($request));
|
||||
|
||||
return $this->response->created(url('api/contacts/' . $contact->id));
|
||||
return $this->response->created(route('api.contacts.show', $contact->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ class Items extends ApiController
|
||||
{
|
||||
$item = $this->dispatch(new CreateItem($request));
|
||||
|
||||
return $this->response->created(url('api/items/' . $item->id));
|
||||
return $this->response->created(route('api.items.show', $item->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class Reports extends ApiController
|
||||
{
|
||||
$report = $this->dispatch(new CreateReport($request));
|
||||
|
||||
return $this->response->created(url('api/reports/' . $report->id));
|
||||
return $this->response->created(route('api.reports.show', $report->id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user