Update the specified resource in storage.

@param  int  $id
@return Response
507428
public function update(Request $request, $id)
	{
		$entity = UUID::findOrFail($id)->entity;
		return ResourceController::resolveController($entity)->update($entity);
	}
113291
public function update(Update $request, $id)
    {
        try {
            $data = !$request->has('password') ? $request->except('password') : $this->inputAll();

            $user = $this->repository->findById($id);

            $user->update($data);

            $user->roles()->sync((array) \Input::get('role'));

            return $this->redirect('users.index');
        } catch (ModelNotFoundException $e) {
            return $this->redirectNotFound();
        }
    }
936530
public function update($id)
    {
        $data = Input::all();

        $isEditable = $this->isEditable($data);

        $data = $this->handleEditable($data);

        $data = $this->handleFileDelete($data);

        if ($this->handleOrderable($id, $data)) {
            return response([
                'status'  => true,
                'message' => trans('admin.update_succeeded'),
            ]);
        }

        /* @var Model $this->model */
        $this->model = $this->model->with($this->getRelations())->findOrFail($id);

        $this->setFieldOriginalValue();

        // Handle validation errors.
        if ($validationMessages = $this->validationMessages($data)) {
            if (!$isEditable) {
                //$name = str_replace('update','edit',\Route::currentRouteName());
                //return redirect()->route($name, [explode('.', $name)[0] => $id])->withInput()->withErrors($validationMessages);
                return back()->withInput()->withErrors($validationMessages);
            } else {
                return response()->json(['errors' => array_dot($validationMessages->getMessages())], 422);
            }
        }

        if (($response = $this->prepare($data)) instanceof Response) {
            return $response;
        }

        DB::transaction(function () {
            $updates = $this->prepareUpdate($this->updates);

            foreach ($updates as $column => $value) {
                /* @var Model $this->model */
                $this->model->setAttribute($column, $value);
            }

            $this->model->save();

            $this->updateRelation($this->relations);
        });

        if (($result = $this->complete($this->saved)) instanceof Response) {
            return $result;
        }

        if ($response = $this->ajaxResponse(trans('admin.update_succeeded'))) {
            return $response;
        }

        return $this->redirectAfterUpdate();
    }
777935
public function update($id, array $data)
    {
        $upload = $this->client->put(
            sprintf('buckets/%d/uploads/%d.json', $this->bucket, $id),
            [
                'json' => $data,
            ]
        );

        return new Upload($this->response($upload));
    }
222225
protected function __apiUpdate(string $id)
    {
        $record = HCCountries::findOrFail($id);
        $record->languages()->sync(array_get($this->getInputData(), 'languages'));

        return $this->apiShow($record->id);
    }
800595
public function update($id)
    {
        $request = $this->makeRequest('update');
        $model = $this->service->update($request, $id);

        if(is_a($model, \Exception::class)) {

            return $this->getErrorResource($model);

        } else {

            return $this->maybeMakeResource('single', $model, 201);
        }
    }
624682
protected function __apiUpdate(string $id)
    {
        $record = HCPages::findOrFail($id);

        $data = $this->getInputData();

        $record->update(array_get($data, 'record'));
        $record->updateTranslations(array_get($data, 'translations'));
        $record->categories()->sync(array_get($data, 'categories', []));
        $record->removeCachedMenu();

        return $this->apiShow($record->id);
    }
522022
public function update($id, $data)
    {
        $message = $this->client->put(
            sprintf('buckets/%d/messages/%d.json', $this->bucket, $id),
            [
                'json' => $data,
            ]
        );

        return new Message($this->response($message));
    }
655790
protected function updateSession($id)
    {
        $this->session->set($this->getName(), $id);

        $this->session->migrate(true);
    }
754018
protected function __apiUpdate(string $id)
    {
        $data = $this->getInputData();

        $record = HCStreets::findOrFail($id);


        $record->update(array_get($data, 'record'));
        $record->city_parts()->sync(array_get($data, 'city_parts'));

        return $this->apiShow($record->id);
    }
176720
public function actionUpdate($id)
{
$model = $this->findModel($id);

if ($model->load($_POST) && $model->save()) {
return $this->redirect(Url::previous());
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
1132995
public function renew(int $id)
    {
        $this->updates[$id] = $this->now + $this->timeout;
    }
858209
public function actionUpdate($id)
    {
        $model = $this->findModel($id);

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            Yii::$app->session->setFlash('postSaved');
        }

        if ($model->type->show_category) {
            $model->setScenario('required_category');
        }

        return $this->render('update', ['model' => $model]);
    }
1118290
public function apiUpdate(string $id)
    {
        DB::beginTransaction();

        try {
            $record = $this->__apiUpdate($id);
        } catch (\Exception $e) {
            DB::rollback();

            return HCLog::error('CORE-0003' . $e->getCode(), $e->getMessage());
        }

        DB::commit();

        return $record;
    }
379018
public function update($id, Request $request)
    {
        return $this->updateModel($this->model()->find($id), $request->all(), 'edit');
    }
31031
public function update(Request $request, $id)
    {
        $this->model = $this->model->findOrFail($id);

        $request = $this->processRequest($request);

        if ($request === true) {
            return $this->redirection();
        }

        $this->validate($request, $this->model->rules());

        $this->model->update($request->all());

        $saved = $this->afterSaving($request);

        if ($saved) {
            return $this->redirection();
        }
    }
652146
public function update($id = null) {
        if($id)
            $array = KernelDB::update($this, $this->tuples, static::$model, $id);
        else
            $array = KernelDB::update($this, $this->tuples, static::$model, kernelHttp::request()->getRequiredParameter());

        self::updateThis($this, $array);
    }