If I do a update passing a data array with request->all() it not takes fillable
I change the update method adding ->first like this:
public function update(array $data, $id, $attribute = "id")
{
return $this->model->where($attribute, '=', $id)->first()->update($data);
}
it works!!!
If I do a update passing a data array with request->all() it not takes fillable
I change the update method adding ->first like this:
public function update(array $data, $id, $attribute = "id")
{
return $this->model->where($attribute, '=', $id)->first()->update($data);
}
it works!!!