I have a model Driver which have columns: name, branch, status_id, etc..Updating is actually fine and working, my problem is how can I return the updated one?
Here's what I tried so far, but it returns a boolean, resulting of returning an error in my console:
The Response content must be a string or object implementing __toString(), "boolean" given.
public function updateStatus(Driver $driver)
{
return $driver->update($this->validateStatus());
}
public function validateStatus()
{
return $this->validate(request(), [
'status_id' => 'required|min:1|max:3'
]);
}
I expect it should return the all the columns of a driver.
I've been to this link but it doesn't helped. Someone knows how to do this?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/373tp2N
via IFTTT
Aucun commentaire:
Enregistrer un commentaire