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

@ -42,7 +42,7 @@ class Contacts extends ApiController
$contact = Contact::where('email', $id)->first();
}
return $this->response->item($contact, new Transformer());
return $this->item($contact, new Transformer());
}
/**
@ -55,7 +55,7 @@ class Contacts extends ApiController
{
$contact = $this->dispatch(new CreateContact($request));
return $this->response->created(route('api.contacts.show', $contact->id));
return $this->response->created(route('api.contacts.show', $contact->id), $this->item($contact, new Transformer()));
}
/**