Ask, reply and learn. Join the community of Akaunting.
/**
* Update the specified resource in storage.
*
* @param $contact
* @param $request
* @return \Dingo\Api\Http\Response
*/
public function update(Contact $contact, Request $request)
{
$contact = $this->dispatch(new UpdateContact($contact, $request));
return $this->item($contact->fresh(), new Transformer());
}
respond this error
+"message": "No query results for model [App\Models\Common\Contact] 1"
+"status_code": 404
i bet is error on Contact $contact, but no ideal what it should be? do this update api still working?
*[PUT] api/contacts/1?company_id=1
typo on title.
found that apicompany middleware not being called, may i know where to include it? found no where.
is this causing error $this->$type->getAttribute('id'); when PATCH execute
Finally i modify some of the code to make it update successful. Hope there will be any respond from you guys.
Have you tried PATCH instead of PUT?
Showing 1 to 6 of 6 discussions