exists) { return false; } return $this->fill($attributes)->save(); } /** * Update specific attributes without firing events. * * @param array $attributes * @return bool */ /*public function updateQuietly(array $attributes = []) { return $this->unsetEventDispatcher()->update($attributes); }*/ /** * Force an update on the model. * * @param array $attributes * @return bool */ /*public function forceUpdate(array $attributes = []) { return $this->fill($attributes)->performUpdate(); }*/ /** * Update only specific columns. * * @param array $attributes * @return bool */ /*public function updateOnly(array $attributes = []) { $this->fill($attributes); $dirty = array_intersect_key($this->getDirty(), array_flip(array_keys($attributes))); if (empty($dirty)) { return false; } Query::table(static::$table_name) ->where('id', $this->id) ->update($this->dataToJson($dirty)); $this->syncChanges(); return true; }*/ }