repository icon indicating copy to clipboard operation
repository copied to clipboard

update() method does not work.

Open DesmondPang opened this issue 10 years ago • 1 comments

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); }

DesmondPang avatar Sep 11 '15 17:09 DesmondPang

Actually, they update() is not called. where($attribute, '=', $id) returns a array and it cannot pass to update().

DesmondPang avatar Sep 11 '15 18:09 DesmondPang