repository
repository copied to clipboard
update() method does not work.
The updata() method does not work. It seems that you missed the first() after where() The where() return an array but not an unique model.
public function update(array $data, $id, $attribute="id") { return $this->model->where($attribute, '=', $id)->update($data); }
Actually, they update() is not called. where($attribute, '=', $id) returns a array and it cannot pass to update().