Update translations

@param array $data
@return \Illuminate\Database\Eloquent\Model
194987
public function updateTranslation(array $data)
    {
        $translation = $this->translations()->where([
            'record_id' => $this->id,
            'language_code' => Arr::get($data, 'language_code'),
        ])->first();

        if (is_null($translation)) {
            $translation = $this->translations()->create($data);
        } else {
            $translation->update($data);
        }

        return $translation;
    }
855609
public function update($data)
    {
        $response = $this->api->put($this->url(), $data);
        $this->data = (array) $response->data;

        return $this;
    }
911619
public function update(array $data)
    {
        $affected = 0;
        foreach ($this->table->data['data'] as &$rs) {
            if ($this->matchWhere($rs)) {
                $rs = array_merge($rs, $data);
                $affected++;
            }
        }

        if ($affected) {
            $this->table->save();
        }

        return $affected;
    }
268202
public function updateByIntId(array $data, int $id): Model
    {
        $model = $this->byIntIdOrFail($id);

        return $this->updateByModel($model, $data);
    }
870789
public function update(array $data)
    {
        $upload = Basecamp::uploads($this->bucket->id)
                          ->update($this->id, $data);

        $this->setAttributes($upload);

        return $upload;
    }
1078272
public function updateShelf(array $data)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_SHELF_UPDATE_PREFIX, $data, [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success';
    }
286933
public function updates($data)
    {
        $data = &$this->loadFilterData($data);
        if ( $data == false ) {
            return false;
        }
        $conditions = $this->sqlBuilder->buildCondition();
        return $this->db->update($this->table, $data, $conditions);
    }
645880
public function update(array $data)
    {
        try
        {
            if ( $this->validator->with($data)->validForUpdate() )
            {
                $this->users->update($data['id'], $this->validator->getData());
                return true;
            }
        }
        catch (LoginRequiredException $e)
        {
            $this->validator->add('LoginRequiredException',$e->getMessage());
        }
        catch (PasswordRequiredException $e)
        {
            $this->validator->add('PasswordRequiredException',$e->getMessage());
        }
        catch (UserExistsException $e)
        {
            $this->validator->add('UserExistsException',$e->getMessage());
        }

        return false;
    }
839414
public function update($data)
    {

        if (is_array($data)) {
            if ($this->isAssocStr($data)) {

                $query = "UPDATE " . self::$table . ' SET ';

                $this->values = array_values(array_map(function ($c) {
                    return self::sanitize($c);
                }, $data));

                $this->columns = array_keys($data);

                $columnParam = array_map(function ($column) {
                    return self::sanitize($column) . '=?';
                }, $this->columns);

                $query .= $this->columnize($columnParam);

                if (!empty($this->whereby)) {

                    $query = $query . ' WHERE ' . $this->whereby;
                }

                try {
                    $stm = Connect::getConn()->prepare($query);
                } catch (Exception $e) {

                    static::$response["status"] = "error";
                    static::$response["response"] = $e->getMessage();
                    static::$response["code"]=$e->getCode();
                    return self::terminate(static::$response);
                }

                try {

                    $stm->execute($this->values);

                    static::$response["status"] = "success";
                    static::$response["response"] = "success";
                    static::$response["code"] = 200;

                    return static::terminate(static::$response);

                } catch (Exception $e) {
                    static::$response["status"] = "error";
                    static::$response["response"] = $e->getMessage();
                    static::$response["code"]=$e->getCode();
                    return self::terminate(static::$response);
                }
            }

            static::$response["status"] = "error";
            static::$response["response"] = "Associative array expected in update function but sequential array passed";
            static::$response["code"]=6501;
            return self::terminate(static::$response);

        }
        static::$response["status"] = "error";
        static::$response["response"] = "Unrecognized data. Associative array expected in update function";
        static::$response["code"]=6500;
        return self::terminate(static::$response);
    }
410407
public function update(array $data)
    {
        $todolist = Basecamp::todoLists($this->bucket->id)
                            ->update($this->id, $data);

        $this->setAttributes($todolist);

        return $todolist;
    }
1069423
private function setValues(array $data)
    {
        foreach ($data as $key => $datum) {
            $this->set($key, $datum);
        }
        return $this;
    }
592208
protected function internalUpdateFromData(array $data) {
        $initializing = $this->initializing;
        $this->initializing = true;
        $this->readOnlyOverride(function() use ($data) {
            return $this->updateFromData($data);
        });
        $this->initializing = $initializing;
    }
1199415
public function replace(array $data) {
        $addFields = implode('`,`', array_keys($data));
        return $this->command()
            ->insertOrReplace("`{$addFields}`", Str::repeat('?', $data),
                array_values($data));
    }
807240
public static function update($data)
    {
        $self      = self::getInstance();

        $table     = $self->table_name;
        $param     = $self->makeUpdateParameter($data);
        $value     = $self->makeInsertParameter($data);

        $statement = "UPDATE {$table} SET {$param} ";
        $execute   = $self->exec($statement, $value);

        return $execute;
    }
1288732
public function setData(array $data) {
		$this->data = $data;

		$this->resetFields();

		foreach($data as $name=>$data)
			$this->newField($name, $data);

		$this->updateChilds();

		return $this;
	}
798777
public function update(array $data)
    {
        $this->compileData($data);
        $arguments      = $this->arguments;
        $sql            = 'UPDATE '.$this->getFrom().' SET '.$this->setString;
        //设置了条件
        if ($this->condition->count() > 0) {
            $whereStr       = (string)$this->condition->compile();
            $whereArguments = $this->condition->arguments();
            $sql            = $sql.' where '.$whereStr;
            $arguments      = ArrayLib::array_add($arguments, $whereArguments);
        }
        return $this->connection->executeUpdate($sql, $arguments);
    }
901488
public function updateApply(array $data)
    {
        $url = "https://api.weixin.qq.com/shakearound/device/update?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, $data);
    }