Update the given task.

@param  Request  $request
@param  Task  $task
@return Response
344175
public function update(Request $request, Evento $evento)
	{
		$this->authorize('blog',  Auth::user());
	
		$this->validate($request, Evento::storeRules());
	
		\DB::transaction(function () use ($request, $evento){
			$evento->update(Evento::storeAttributes($request));
			
		});
	
	
		return redirect(route('evento.edit', $evento))->with('success', 'Profile updated!');
	}
1275107
public function setTask(Task $task = null)
    {
        $this->task = $task;
        if (null !== $task) {
            $task->addTransition($this);
        }

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

        return parent::updateCrud();
    }
1066856
public function updateAction(Request $request): JsonResponse
    {
        $id   = $request->request->get('id');
        $data = $request->request->get('product');
        
        try {
            $this->quickUpdateProduct($id, $data);
            $result = ['success' => $this->trans('product.flash.success.saved')];
        } catch (\Exception $e) {
            $result = ['error' => $e->getMessage()];
        }
        
        return $this->jsonResponse($result);
    }
831438
public function update(models\Download\Task $downloadTask)
    {
        $rest = $this->callService('PUT',self::API_DOWNLOAD . $downloadTask->getId(), $downloadTask);

        return $rest->getModel(models\Download\Task::class);
    }
23399
public function update(Request $request)
    {
        $user = \App\User::findOrfail($request->user_id);

        $user->email = $request->email;
        $user->name = $request->name;
        $user->password = Hash::make($request->password);

        $user->save();

        return redirect('scaffold-users');
    }
1064234
public function start(Task $task)
    {
        $task->setStatus(Task::STATUS_STARTED);

        $this->om->persist($task);
        $this->om->flush();

        $this->notify(NotifierInterface::MESSAGE_UPDATE);

        return $task;
    }
79180
public function update(Request $request)
    {
        $action = $request->input('action');

        $thread = $this->api("thread.{$action}", $request->route('thread'))->parameters($request->all())->patch();

        Forum::alert('success', 'threads.updated', 1);

        return redirect(Forum::route('thread.show', $thread));
    }
1096434
public function update(Request $request, $id)
    {
        $this->validate($request, ['text' => 'required|max:64|regex:/^[ a-zA-Z0-9_.-]*$/']);

        $tag = Tag()::findOrFail($id);
        $tag->text = $request->text;
        $tag->save();
    }
456417
def update_case_task(self, task):
        
        req = self.url + "/api/case/task/{}".format(task.id)

        # Choose which attributes to send
        update_keys = [
            'title', 'description', 'status', 'order', 'user', 'owner', 'flag', 'endDate'
        ]

        data = {k: v for k, v in task.__dict__.items() if k in update_keys}

        try:
            return requests.patch(req, headers={'Content-Type': 'application/json'}, json=data,
                                  proxies=self.proxies, auth=self.auth, verify=self.cert)
        except requests.exceptions.RequestException as e:
            raise CaseTaskException("Case task update error: {}".format(e))
787257
public function statusAction(Request $request)
    {
        $taskManager = $this->get('phlexible_task.task_manager');

        $states = $taskManager->getStates();

        return new JsonResponse(['states' => $states]);
    }
779243
public function update( models\Download\Task $downloadTask){
        $rest = $this->getService( self::API_DOWNLOAD . $downloadTask->getId());
        $rest->PUT( $downloadTask);

        return $rest->getResult( models\Download\Task::class);
    }
1005145
public function delete(Task $task): void
    {
        $id = $task->getId();

        $task->setId(null);

        $this->client->delete($this->prepareUrlForKey('delete-task', ['id' => $id]));
    }
474275
public function show(TaskRequest $request, Task $task)
    {

        if ($task->exists) {
            $view = 'task::task.show';
        } else {
            $view = 'task::task.new';
        }

        return $this->response->title(trans('app.view') . ' ' . trans('task::task.name'))
            ->data(compact('task'))
            ->view($view, true)
            ->output();
    }
796344
public function update(Request $request)
    {
        $post = $this->api('post.fetch', $request->route('post'))->get();

        $this->authorize('edit', $post);

        $post = $this->api('post.update', $request->route('post'))->parameters($request->only('content'))->patch();

        Forum::alert('success', 'posts.updated');

        return redirect(Forum::route('thread.show', $post));
    }
722253
public function setTask($task)
    {
        $taskCode = filter_var($task, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
        if (strpos($taskCode, '-') !== false) {
            $taskCode = str_replace('-', '', $taskCode);
        }
        $taskCode = $this->project . $taskCode;
        $this->task = $taskCode;
    }
1176238
public function updateAction(Request $request)
    {
        $form = $this->buildForm(null, $this->find($action = 'update'));

        if (in_array($request->getMethod(), ['POST', 'PUT', 'PATCH'], true)
            && $this->submitForm($form, $request)->isValid()) {
            try {
                $this->getDomainManager()->update($form->getData());
            } catch (DomainException $e) {
                $this->processException($e);
            }
        }

        return $this->processAction($action, $form);
    }