更新好友
@param UpdateFriendRequest $request
@return BaseResponse|UpdateFriendResponse
@throws Exception\TIMException
197052
public function update(UpdateFriendRequest $request)
    {
        $request->setIdentifier($this->identifier);
        $response = new UpdateFriendResponse();
        return $this->client->sendRequest($request, $response);
    }
1312218
public function removeFriendRequest(FriendRequest $friend)
    {
        $oldid = $friend->getId();
        $this->oauthManager->removeFriendRequest($friend);

        return new JsonResponse(array('id' => $oldid));
    }
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();
        }
    }
269793
public static function updateRequest($request) {
        $routeModel = Dir::apiModel(static::$model);
        $heroe = $routeModel::find($request->id);

        foreach($heroe->getTuples() as $tuple)
            if(!empty($request->$tuple))
                $heroe->$tuple = $request->$tuple;

        $heroe->update();
        return $heroe;
    }
684694
public function update($page, $id, UpdateRequest $request)
    {
        $this->authorize('update', $eloquent = app('scaffold.model'));

        try {
            app('scaffold.actions')->exec('save', [$eloquent, $request]);
        } catch (\Exception $e) {
            return back()->withErrors([$e->getMessage()]);
        }

        return $this->redirectTo($page, $id, $request)
            ->with('messages', [
                trans('administrator::messages.update_success',
                    ['item' => app('scaffold.module')->singular()]
                )
            ]);
    }
700982
public function update($id, UpdateRequest $request)
	{
		$level = "danger";
		$message = " You are not permitted to update permissions.";

		if ( Shinobi::can ( config('watchtower.acl.permission.edit', false) ) ) {
			$permission = Permission::findOrFail($id);
			$permission->update($request->all());
			$level = "success";
			$message = "<i class='fa fa-check-square-o fa-1x'></i> Success! Permission edited.";
		}

		return redirect()->route( config('watchtower.route.as') .'permission.index')
				->with( ['flash' => ['message' => $message, 'level' =>  $level] ] );
	}
553
public function updateAction(Request $request, $id)
    {
        $this->checkCsrf();

        $transUnit = $this->get('lexik_translation.data_grid.request_handler')->updateFromRequest($id, $request);

        return $this->get('lexik_translation.data_grid.formatter')->createSingleResponse($transUnit);
    }
1307336
private function mapRequestToUserUpdateStruct($request)
    {
        $contentUpdateStruct = $this->parseContentRequest($request);
        $userUpdateStruct = new UserUpdateStruct();
        foreach ($contentUpdateStruct->fields as $field) {
            if ($field->value instanceof UserFieldValue) {
                $userUpdateStruct->email = $field->value->email;
                $userUpdateStruct->password = $field->value->passwordHash ?: null;

                $field->value->passwordHash = null;
            }
        }

        $userUpdateStruct->contentUpdateStruct = $contentUpdateStruct;

        return $userUpdateStruct;
    }
652150
public function updateAction(Request $request)
    {
        $parameters = $this->serializer->deserialize(json_decode($request->getContent(), true));

        return new JsonResponse($parameters);
    }
1271179
public function getList(GetFriendRequest $request)
    {
        $request->setIdentifier($this->identifier);
        $response = new BaseResponse();
        return $this->client->sendRequest($request, $response);
    }
237715
public function update($id, RolesRequest $request)
    {
        $permissions = $request->permissions ? array_keys($request->permissions) : [];

        $this->role->updateWithUsers($request->all(), $request->users, $id);
        $this->role->attachPermissions($permissions, $id);

        flash(trans('core::messages.resource.resource updated', ['name' => trans('user::roles.title.role')]));

        return redirect()->route('backend::user.role.index');
    }
1198617
public function update(UpdateRequest $request)
    {
        $this->authorize('update', $eloquent = app('scaffold.model'));

        options_save(array_except(
            $request->all(),
            ['_token', 'save']
        ));

        return back()->with('messages', ['Settings saved successfully']);
    }
1232222
public function update(Request $request)
    {
        $user = $request->user();

        $this->validate($request, [
            'name' => 'required',
            'email' => 'required|email|unique:users,email,'.$user->id,
        ]);

        return tap($user)->update($request->only('name', 'email'));
    }
202873
public function updateAction(Request $request)
        {

            try {
                $id = $this->getUser()->getId();

                /** @var User $oUser */
                $oUser = UserQuery::create()->findOneById($id);

                if ($oUser === null) {
                    throw $this->createNotFoundException('Unable to find User entity.');
                }

                $aPost = $request->request->get("form");


                $nbUpdatedRows = UserQuery::create()
                    ->filterById($id)
                    ->update(array('NotificationError' => isset($aPost['notification_error']), 'NotificationChange' => isset($aPost['notification_change'])));


                $aResult = array(
                    "success" => true,
                    "message" => $this->get("translator")->trans("notificationcenter.save.successful")
                );

            } catch (\Exception $e) {
                $aResult = array(
                    "success" => false,
                    "message" => $this->get("translator")->trans("notificationcenter.save.failed") . ":<br>" . $e->getMessage()
                );
            }

            $sResult  = json_encode($aResult);
            $response = new Response($sResult);
            $response->headers->set('Content-Type', 'application/json');

            return $response;

        }
75080
public function update(UpdateRequest $request)
    {
        $this->addDefaultGeoFields(\Request::input('template'));
        $this->useTemplate(\Request::input('template'));

        return parent::updateCrud();
    }
1216175
public function update($id, UpdateUserRequest $request)
    {
        $this->user->updateAndSyncRoles($id, $request->all(), $request->roles);

        return $this->successUpdated();
    }
470953
public function update(Request $request, $id)
    {
        $model = (new Services\GroupsPermissionsService)->dataUpdate($id, $request->all());
        $route = config('acl.routes.groups-permissions.edit');
        return redirect()->route($route, $id)->with('success', 'Permissões atualizadas com sucesso');
    }