当前位置: 首页>>代码示例>>PHP>>正文


PHP Request::except方法代码示例

本文整理汇总了PHP中App\Http\Requests\Request::except方法的典型用法代码示例。如果您正苦于以下问题:PHP Request::except方法的具体用法?PHP Request::except怎么用?PHP Request::except使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在App\Http\Requests\Request的用法示例。


在下文中一共展示了Request::except方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update

 public function update($id, Request $request, ConditionRequestManager $conditionRequestManager)
 {
     $activityData = $this->activityManager->getActivityData($id);
     if (Gate::denies('ownership', $activityData)) {
         return redirect()->back()->withResponse($this->getNoPrivilegesMessage());
     }
     $this->authorizeByRequestType($activityData, 'conditions');
     $condition = $request->except(['_token', '_method']);
     if ($this->conditionManager->update($condition, $activityData)) {
         $this->activityManager->resetActivityWorkflow($id);
         $response = ['type' => 'success', 'code' => ['updated', ['name' => 'Conditions']]];
         return redirect()->to(sprintf('/activity/%s', $id))->withResponse($response);
     }
     $response = ['type' => 'danger', 'code' => ['update_failed', ['name' => 'Related Activity']]];
     return redirect()->back()->withInput()->withResponse($response);
 }
开发者ID:younginnovations,项目名称:aidstream,代码行数:16,代码来源:ConditionController.php

示例2: edit

 public function edit($id, Request $inputs)
 {
     $all = $inputs->except('_token');
     return WallPanel::where('id', $id)->update($all);
 }
开发者ID:shegun-babs,项目名称:dakrush,代码行数:5,代码来源:WallPanelRepo.php

示例3: updateActivityDefault

 /**
  * Update Activity default values
  * @param                              $activityId
  * @param Request                      $request
  * @param ChangeActivityDefaultRequest $changeActivityDefaultRequest
  * @return mixed
  */
 public function updateActivityDefault($activityId, Request $request, ChangeActivityDefaultRequest $changeActivityDefaultRequest)
 {
     $activityData = $this->activityManager->getActivityData($activityId);
     if (Gate::denies('ownership', $activityData)) {
         return redirect()->route('activity.index')->withResponse($this->getNoPrivilegesMessage());
     }
     $this->authorize('edit_activity', $activityData);
     $settings = $this->settingsManager->getSettings($this->organization_id);
     $SettingsDefaultFieldValues = $settings->default_field_values;
     $defaultFieldValues = $activityData->default_field_values[0] ? $activityData->default_field_values[0] : $SettingsDefaultFieldValues[0];
     $defaultFieldValues = [array_merge($defaultFieldValues, $request->except(['_method', '_token']))];
     $result = $this->changeActivityDefaultManager->update($defaultFieldValues, $activityData);
     if (!$result) {
         $response = ['type' => 'danger', 'code' => ['save_failed', ['name' => 'Activity Defaults']]];
         return redirect()->back()->withResponse($response);
     }
     $this->activityManager->resetActivityWorkflow($activityId);
     $response = ['type' => 'success', 'code' => ['updated', ['name' => 'Activity Defaults']]];
     return redirect()->route('activity.show', [$activityId])->withResponse($response);
 }
开发者ID:younginnovations,项目名称:aidstream,代码行数:27,代码来源:ActivityController.php

示例4: update

 /**
  * updates transaction
  * @param Request            $request
  * @param                    $id
  * @param                    $transactionId
  * @param TransactionRequest $transactionRequest
  * @return mixed
  */
 public function update(Request $request, $id, $transactionId, TransactionRequest $transactionRequest)
 {
     $activity = $this->activityManager->getActivityData($id);
     if (Gate::denies('ownership', $activity)) {
         return redirect()->back()->withResponse($this->getNoPrivilegesMessage());
     }
     if (!$this->currentUserIsAuthorizedForTransaction($transactionId)) {
         return redirect()->back()->withResponse($this->getNoPrivilegesMessage());
     }
     $this->authorize('edit_activity', $activity);
     $transactionDetails = $transactionData = $request->except(['_token', '_method']);
     removeEmptyValues($transactionData);
     $activityDetails = $activity->toArray();
     removeEmptyValues($activityDetails);
     if ($this->recipientCountryAndRegionAreInvalid($activityDetails, $transactionDetails)) {
         $response = ['type' => 'warning', 'code' => ['message', ['message' => 'You cannot save Recipient Country or Recipient Region in transaction level because you have already saved recipient country or region in activity level.']]];
         return redirect()->back()->withInput()->withResponse($response);
     }
     $this->filterSector($transactionDetails);
     $this->transactionManager->save($transactionDetails, $activity, $transactionId);
     $this->activityManager->resetActivityWorkflow($id);
     $response = ['type' => 'success', 'code' => ['updated', ['name' => 'Transactions']]];
     return redirect()->to(sprintf('/activity/%s/transaction', $id))->withResponse($response);
 }
开发者ID:younginnovations,项目名称:aidstream,代码行数:32,代码来源:TransactionController.php


注:本文中的App\Http\Requests\Request::except方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。