當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。