public function update(array $attributes = [], array $options = []) { if (!$this->exists) { return false; } return $this->fill($attributes)->save($options); }
/** * Update a user. * * @param Model $item * @param array $data * @return bool|int */ public function update(Model $item, array $data) { if (isset($data['password'])) { $data['password'] = bcrypt($data['password']); } return $item->update($data); }