Update a to-do list.

@param  int    $id
@param  array  $data
@return \Illuminate\Support\Collection
338397
public function update($id, array $data)
    {
        $todolist = $this->client->put(
            sprintf('buckets/%d/todolists/%d.json', $this->bucket, $id),
            [
                'json' => $data,
            ]
        );

        return new TodoList($this->response($todolist));
    }
1103140
public function addKstrukturs($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass add to internal logic
		try {
			$this->doAddKstrukturs($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_KSTRUKTURS_ADD, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_KSTRUKTURS_ADD, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
857275
public function update($id, array $data)
    {
        $istance = $this->getById($id);

        if (! $istance)
        {
            return false;
        }

        return $istance->update($data);
    }
744830
public function updateFeaturedSkills($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Video not found.']);
		}

		// pass update to internal logic
		try {
			$this->doUpdateFeaturedSkills($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(VideoEvent::PRE_FEATURED_SKILLS_UPDATE, $model, $data);
		$this->dispatch(VideoEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(VideoEvent::POST_FEATURED_SKILLS_UPDATE, $model, $data);
		$this->dispatch(VideoEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

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

        return $this->updateByModel($model, $data);
    }
576018
public function patch($api, $id, array $data = [])
    {
        return $this->checkException($this->callHttpMethod($this->normalizeUri($api, $id), Request::METHOD_PATCH, $data));
    }
317362
public function upsert($id, $data)
    {
        return $this->db->upsert($this->name, $id, $data);
    }
1137270
public function update($id, $data)
    {
        $modelName = $this->modelFullName;
        if($this->validate($data, $modelName::$rules))
        {
            $model = $modelName::find($id);
            if(!$model) throw new NotFoundException('There is no Resource with id = ' . $id . ' !');
            $model->update($data);
            return $model;
        }
    }
191228
public function update($id, array $data)
    {
        $chatbot = $this->client->put(
            sprintf('buckets/%d/chats/%d/integrations/%d.json', $this->bucket, $this->parent, $id),
            [
                'json' => $data
            ]
        );
        $chatbot = new Chatbot($this->response($chatbot));
        $chatbot->inContext($this->bucket, $this->parent);

        return $chatbot;
    }
181465
public function addParts($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass add to internal logic
		try {
			$this->doAddParts($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_PARTS_ADD, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_PARTS_ADD, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
374529
public function update(array $data, $field, $id)
    {
        $this->applyCriteria();

        /** @var Model $model */
        $model = $this->model->where($field, $id)->first();

        $model->fill($data)->save();

        return $model;
    }
1314026
public function save(string $id, array $data)
    {
        $this->setFile($id);
        if ($this->file) {
            if (file_exists($this->file)) {
                $this->update($id, $data);
            } else {
                $this->add($id, $data);
            }
        }
    }
712387
public function update($id, array $data) : bool
    {
        if ($record = $this->find($id)) {
            $data = $this->preUpdate($this->parseData($data), $id, $record);
            return $this->postUpdate($data, $id, $record->update($data), $record);
        } else {
            $this->throwModelNotFoundException($id);
        }
    }
313915
public function update($id, $data) {
		$dt = $this->getDataTable();
		
		if (! $dt)
			return $this->createResponse($this->getNameManager()->getTableNames(), 401, "Tabels");
		
		return $this->createResponse([], 200, "{$this->getNameManager()->entityName}: No Update");
	}
855734
public function update ($item_id, array $data) {
		return $this->api->update($this->list_name, $item_id, $data);
	}
408367
public function addReferences($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass add to internal logic
		try {
			$this->doAddReferences($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_REFERENCES_ADD, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_REFERENCES_ADD, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
397882
public function update(array $data, $id)
    {
        if (array_key_exists('password', $data)) {
            $data['password'] = bcrypt($data['password']);
        }

        return parent::update($data, $id);
    }