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


PHP Binput::all方法代码示例

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


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

示例1: putMetric

 /**
  * Update an existing metric.
  *
  * @param \CachetHQ\Cachet\Models\Metric $metric
  *
  * @return \CachetHQ\Cachet\Models\Metric
  */
 public function putMetric(Metric $metric)
 {
     $metric->update(Binput::all());
     if ($metric->isValid('updating')) {
         return $this->item($metric);
     }
     throw new BadRequestHttpException();
 }
开发者ID:n0mer,项目名称:Cachet,代码行数:15,代码来源:MetricController.php

示例2: putIncident

 /**
  * Update an existing incident.
  *
  * @param \CachetHQ\Cachet\Models\Inicdent $incident
  *
  * @return \CachetHQ\Cachet\Models\Incident
  */
 public function putIncident(Incident $incident)
 {
     $incident->update(Binput::all());
     if ($incident->isValid('updating')) {
         return $this->item($incident);
     }
     throw new BadRequestHttpException();
 }
开发者ID:2bj,项目名称:Cachet,代码行数:15,代码来源:IncidentController.php

示例3: postSubscribe

 /**
  * Handle the subscribe user.
  *
  * @return \Illuminate\View\View
  */
 public function postSubscribe()
 {
     try {
         $this->dispatch(new SubscribeSubscriberCommand(Binput::get('email')));
     } catch (ValidationException $e) {
         return Redirect::route('subscribe.subscribe')->withInput(Binput::all())->withTitle(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.whoops'), trans('gitamin.subscriber.email.failure')))->withErrors($e->getMessageBag());
     }
     return Redirect::route('explore')->withSuccess(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.awesome'), trans('gitamin.subscriber.email.subscribed')));
 }
开发者ID:xiuchanghu,项目名称:Gitamin,代码行数:14,代码来源:SubscribeController.php

示例4: putMetric

 /**
  * Update an existing metric.
  *
  * @param \CachetHQ\Cachet\Models\Metric $metric
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function putMetric(Metric $metric)
 {
     try {
         $metric->update(Binput::all());
     } catch (Exception $e) {
         throw new BadRequestHttpException();
     }
     return $this->item($metric);
 }
开发者ID:RetinaInc,项目名称:Cachet,代码行数:16,代码来源:MetricController.php

示例5: createSubscriberAction

 /**
  * Creates a new subscriber.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function createSubscriberAction()
 {
     try {
         dispatch(new SubscribeSubscriberCommand(Binput::get('email')));
     } catch (ValidationException $e) {
         return Redirect::route('dashboard.subscribers.add')->withInput(Binput::all())->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.subscribers.add.failure')))->withErrors($e->getMessageBag());
     }
     return Redirect::route('dashboard.subscribers.add')->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.subscribers.add.success')));
 }
开发者ID:mohitsethi,项目名称:Cachet,代码行数:14,代码来源:SubscriberController.php

示例6: putIncident

 /**
  * Update an existing incident.
  *
  * @param \CachetHQ\Cachet\Models\Inicdent $incident
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function putIncident(Incident $incident)
 {
     try {
         $incident->update(Binput::all());
     } catch (Exception $e) {
         throw new BadRequestHttpException();
     }
     return $this->item($incident);
 }
开发者ID:RetinaInc,项目名称:Cachet,代码行数:16,代码来源:IncidentController.php

示例7: postSubscribe

 /**
  * Handle the subscribe user.
  *
  * @return \Illuminate\View\View
  */
 public function postSubscribe()
 {
     $subscriber = Subscriber::create(['email' => Binput::get('email')]);
     if (!$subscriber->isValid()) {
         return Redirect::back()->withInput(Binput::all())->with('title', sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure')))->with('errors', $subscriber->getErrors());
     }
     $successMsg = sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed'));
     event(new CustomerHasSubscribedEvent($subscriber));
     return Redirect::route('status-page')->with('success', $successMsg);
 }
开发者ID:n0mer,项目名称:Cachet,代码行数:15,代码来源:SubscribeController.php

示例8: postSubscribe

 /**
  * Handle the subscribe user.
  *
  * @return \Illuminate\View\View
  */
 public function postSubscribe()
 {
     try {
         $subscriber = Subscriber::create(['email' => Binput::get('email')]);
     } catch (ValidationException $e) {
         return Redirect::route('subscribe.subscribe')->withInput(Binput::all())->withTitle(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure')))->withErrors($e->getMessageBag());
     }
     event(new CustomerHasSubscribedEvent($subscriber));
     return Redirect::route('status-page')->withSuccess(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed')));
 }
开发者ID:RetinaInc,项目名称:Cachet,代码行数:15,代码来源:SubscribeController.php

示例9: createSubscriberAction

 /**
  * Creates a new subscriber.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function createSubscriberAction()
 {
     $email = Binput::get('email');
     $subscriber = Subscriber::create(['email' => $email]);
     if (!$subscriber->isValid()) {
         return Redirect::back()->withInput(Binput::all())->with('title', sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.subscribers.add.failure')))->with('errors', $subscriber->getErrors());
     }
     $successMsg = sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.subscribers.add.success'));
     event(new CustomerHasSubscribedEvent($subscriber));
     return Redirect::back()->with('success', $successMsg);
 }
开发者ID:n0mer,项目名称:Cachet,代码行数:16,代码来源:SubscriberController.php

示例10: createSubscriberAction

 /**
  * Creates a new subscriber.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function createSubscriberAction()
 {
     $email = Binput::get('email');
     try {
         $subscriber = Subscriber::create(['email' => $email]);
     } catch (ValidationException $e) {
         return Redirect::route('dashboard.subscribers.add')->withInput(Binput::all())->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.subscribers.add.failure')))->withErrors($e->getMessageBag());
     }
     event(new CustomerHasSubscribedEvent($subscriber));
     return Redirect::route('dashboard.subscribers.add')->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.subscribers.add.success')));
 }
开发者ID:RetinaInc,项目名称:Cachet,代码行数:16,代码来源:SubscriberController.php

示例11: putMetricPoint

 /**
  * Updates a metric point.
  *
  * @param \CachetHQ\Cachet\Models\Metric      $metric
  * @param \CachetHQ\Cachet\Models\MetircPoint $metricPoint
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function putMetricPoint(Metric $metric, MetricPoint $metricPoint)
 {
     $metricPointData = Binput::all();
     $metricPointData['metric_id'] = $metric->id;
     if ($timestamp = array_pull($metricPointData, 'timestamp')) {
         $pointTimestamp = Carbon::createFromFormat('U', $timestamp);
         $metricPointData['created_at'] = $pointTimestamp->format('Y-m-d H:i:s');
     }
     $metricPoint->update($metricPointData);
     return $this->item($metricPoint);
 }
开发者ID:practico,项目名称:Cachet,代码行数:19,代码来源:MetricPointController.php

示例12: postUpdateComponentOrder

 /**
  * Updates a components ordering.
  *
  * @return array
  */
 public function postUpdateComponentOrder()
 {
     $componentData = Binput::all();
     unset($componentData['component'][0]);
     // Remove random 0 index.
     foreach ($componentData['component'] as $componentId => $order) {
         $component = Component::find($componentId);
         $component->update(['order' => $order]);
     }
     return $componentData;
 }
开发者ID:baa-archieve,项目名称:Cachet,代码行数:16,代码来源:DashAPIController.php

示例13: postSubscribe

 /**
  * Handle the subscribe user.
  *
  * @return \Illuminate\View\View
  */
 public function postSubscribe()
 {
     $email = Binput::get('email');
     try {
         dispatch(new SubscribeSubscriberCommand($email));
     } catch (AlreadySubscribedException $e) {
         return Redirect::route('subscribe.subscribe')->withTitle(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure')))->withErrors(trans('cachet.subscriber.email.already-subscribed', ['email' => $email]));
     } catch (ValidationException $e) {
         return Redirect::route('subscribe.subscribe')->withInput(Binput::all())->withTitle(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure')))->withErrors($e->getMessageBag());
     }
     return Redirect::route('status-page')->withSuccess(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed')));
 }
开发者ID:reginaldojunior,项目名称:Cachet,代码行数:17,代码来源:SubscribeController.php

示例14: createSubscriberAction

 /**
  * Creates a new subscriber.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function createSubscriberAction()
 {
     $verified = app(Repository::class)->get('setting.skip_subscriber_verification');
     try {
         $subscribers = preg_split("/\r\n|\n|\r/", Binput::get('email'));
         foreach ($subscribers as $subscriber) {
             dispatch(new SubscribeSubscriberCommand($subscriber, $verified));
         }
     } catch (ValidationException $e) {
         return Redirect::route('dashboard.subscribers.add')->withInput(Binput::all())->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.subscribers.add.failure')))->withErrors($e->getMessageBag());
     }
     return Redirect::route('dashboard.subscribers.add')->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.subscribers.add.success')));
 }
开发者ID:aksalj,项目名称:Cachet,代码行数:18,代码来源:SubscriberController.php

示例15: postUpdateUser

 /**
  * Updates a user.
  *
  * @param \CachetHQ\Cachet\Models\User $user
  *
  * @return \Illuminate\View\View
  */
 public function postUpdateUser(User $user)
 {
     $items = Binput::all();
     $passwordChange = array_get($items, 'password');
     if (trim($passwordChange) === '') {
         unset($items['password']);
     }
     $user->update($items);
     if (!$user->isValid()) {
         return Redirect::back()->withInput(Binput::except('password'))->with('title', sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.edit.failure')))->with('errors', $user->getErrors());
     }
     $successMsg = sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success'));
     return Redirect::back()->with('success', $successMsg);
 }
开发者ID:n0mer,项目名称:Cachet,代码行数:21,代码来源:TeamController.php


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