Update the specified resource in storage.

@param  \Illuminate\Http\Request  $request
@param  int  $id
@return \Illuminate\Http\Response
502177
public function update(CreatePermissionGroup $request, $id)
    {
        $group = Permission_group::findOrFail($id);
		$group->name = $request->name;
		$group->code = $request->code;
		$group->save();
		
		return redirect(url("permission/group"))->with('dp_announce', trans('deeppermission.alert.group.updated'));
    }
19314
public function update(Request $request, $id)
    {
      $permission = Permission::findOrFail($id)->update($request->only('name', 'label'));
      \Session::flash('flash_message', 'Permission updated!');
      return \Redirect::route('admin.permissions.index', [
        ])->withMessage(trans('acl::permission.permissions-controller-successfully_updated'));
      }
413144
public function putAction(Request $request, $id)
    {
        $jsonData = $request->getContent();
        $data = json_decode($jsonData, true);

        // Id should be taken of request uri.
        $data['id'] = $id;

        $targetGroup = $this->deserializeData(json_encode($data));
        $targetGroup = $this->getTargetGroupRepository()->save($targetGroup);
        $this->getEntityManager()->flush();

        return $this->handleView($this->view($targetGroup));
    }
685843
public function update(Request $request, $id)
    {
        $this->roles->findOrFail($id)->update($request->only('name', 'label'));
        return \Redirect::route('admin.roles.index', [
         ])->withMessage(trans('acl::role.roles-controller-successfully_updated'));
    }
1187545
public function update(Request $request, $id)
    {
        if ($request->input('action') == 'update_account') {
            try {
                $this->userRepositoryInterface->update($request->all(), $id);
            } catch (FormValidationException $e) {
                Flash::error($e->getMessage());

                return redirect()
                  ->route('account.edit')
                  ->withErrors($e->getErrors())
                  ->withInput();
            } catch (UsersException $e) {
                Flash::error($e->getMessage());

                return redirect()->route('dashboard.index');
            }

            Flash::success(trans('dashboard::dashboard.flash.account.success'));

            return redirect()->route('account.edit');
        }

        if ($request->input('action') == 'change_password') {
            try {
                $this->userRepositoryInterface->updatePassword($request->all());
            } catch (FormValidationException $e) {
                Flash::error($e->getMessage());

                return redirect()
                  ->route('account.edit')
                  ->withErrors($e->getErrors());
            } catch (AuthenticationException $e) {
                Flash::error(trans('dashboard::dashboard.flash.password.fail'));

                return redirect()
                  ->route('account.edit');
            }

            Flash::success(trans('dashboard::dashboard.flash.password.success'));

            return redirect()->route('account.edit');
        }
    }
12381
public function update($id,Request $request)
    {
        $email = $this->emails->update( $request->all() );

        alert()->success('Email mis à jour');

        return redirect('build/liste/'.$email->list_id);
    }
109842
public function update(Request $request, $id)
    {
        $this->validate($request, [
			'title' => 'required',
			'content' => 'required'
		]);
        $requestData = $request->all();
        
        $page = Page::findOrFail($id);
        $page->update($requestData);

        return redirect('admin/pages')->with('flash_message', 'Page updated!');
    }
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();
    }
421490
public function update(AdminUpdateRequest $request, $id)
    {

        $admin = $this->adminRepository->find($id);

        if (!is_null($admin)) {
            $this->adminRepository->update($admin, $request->all());
        }

        return Redirect::route('admin.admin.index');
    }
10910
public function update(SeoPagesRequest $request, $id)
    {
        $input = $request->all();

        $record = $this->model->findOrFail($id);

        $record->update($input);

        $this->notify([
            'type' => 'success',
            'title' => 'Successful update!',
            'description' => 'SeoPage is updated successfully.',
        ]);

        return redirect()->back();
    }
78125
public function putUpdate(Request $request, $id) {
    $this->validate($request, isset($this->vocabulary->rules_create) ? $this->vocabulary->rules_create : $this->vocabulary->rules);

    $vocabulary = $this->vocabulary->findOrFail($id);
    $vocabulary->update(Input::only('name'));

    return Redirect::to(action('\Devfactory\Taxonomy\Controllers\TaxonomyController@getIndex'))->with('success', 'Updated');

  }
550644
public function update($id, UpdateUserRequest $request)
    {
        $user = $this->repository->findWithoutFail($id);

        if (empty($user)) {
            return $this->sendError('User not found');
        }

        $user = $this->repository->update($request->all(), $id);
        $user->load($request->getWith());

        return $this->sendResponse($user, 'User updated successfully.');
    }
964149
public function update(Request $request, $id = null)
    {
        try {
            $application = $this->applications->save($request, $id);
            if ($request->has('theme')) {
                \Cookie::queue('soda-theme', $request->input('theme'));
                $request->session()->put('soda-theme', $request->input('theme'));
            }
        } catch (Exception $e) {
            return $this->handleException($e, trans('soda::errors.update', ['object' => 'application']));
        }

        return redirect()->route('soda.settings.edit', $application->getKey())->with('success', trans('soda::messages.updated', ['object' => 'application']));
    }
1134711
public function update(Request $request, $id)
    {
        $this->validate(
            $request,
            [
                'name' => 'required',
                'email' => 'required|string|max:255|email|unique:users,email,' . $id,
                'roles' => 'required'
            ]
        );

        $data = $request->except('password');
        if ($request->has('password')) {
            $data['password'] = bcrypt($request->password);
        }

        $user = User::findOrFail($id);
        $user->update($data);

        $user->roles()->detach();
        foreach ($request->roles as $role) {
            $user->assignRole($role);
        }

        return redirect('admin/users')->with('flash_message', 'User updated!');
    }
963392
public function crudUpdate(Request $request, $id)
    {
        try{
            $entity = $this->throwEntityNotFoundException($this->getRepository()->find($id));

            $form = $this->createForm($this->getEntityType(), $entity);
            $form->submit($request);
            
            $page = static::EDIT_VIEW;
            
            if ($form->isValid()) {
                $page = static::SHOW_VIEW;
                $this->saveEntity($entity);
                $form = $this->createDeleteForm($id)->createView();
                return $this->render($page, $this->commonsResponseVars(compact('entity','form')));
            }
            
            $form = $form->createView();
            $delete_form = $this->createDeleteForm($id)->createView();
            return $this->success($page, $this->commonsResponseVars(compact('entity','form','delete_form')));
            
        }catch(\Exception $e){
            return $this->failure($e);
        }
    }
1157114
public function update($id, FileRequest $request)
    {
        $files = $this->repository->find($id);

        if (empty($files)) {
            Cms::notification('File not found', 'warning');

            return redirect(route($this->routeBase.'.files.index'));
        }

        $files = $this->repository->update($files, $request->all());

        Cms::notification('File updated successfully.', 'success');

        return Redirect::back();
    }
66674
public function updateAction(Request $request, $id)
        {

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

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

            $deleteForm = $this->createDeleteForm($id);
            $editForm = $this->createEditForm($oUser);
            $editForm->handleRequest($request);

            $aUserRoles = UserRoleQuery::create()->findByUserId($oUser->getId());

            if ($editForm->isValid()) {


                foreach($aUserRoles as $oUserRole){
                    $oUserRole->setUserId($oUser->getId());
                    $oUserRole->delete();
                }
                $aFormData =$request->request->get('slashworks_backendbundle_user');
                $sPassword = $aFormData['password'];
                $sPasswordRepeat = $aFormData['password_repeat'];
                if(!empty($sPassword) && !empty($sPasswordRepeat)){
                    if($sPassword === $sPasswordRepeat){
                        $factory  = $this->get('security.encoder_factory');
                        $encoder  = $factory->getEncoder($oUser);
                        $sPassword = $encoder->encodePassword($sPassword, $oUser->getSalt());
                        $oUser->setPassword($sPassword);
                    }else{

                    }
                }elseif(!empty($sPassword) && empty($sPasswordReqpeat)){

                }

                $oUser->save();

                return $this->redirect($this->generateUrl('backend_system_user'));
            }

            return $this->render('SlashworksBackendBundle:User:edit.html.twig', array(
                'entity'      => $oUser,
                'edit_form'   => $editForm->createView(),
                'delete_form' => $deleteForm->createView(),
            ));
        }