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


PHP Binput::except方法代码示例

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


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

示例1: postUpdateComponent

 /**
  * Updates a component with the entered info.
  *
  * @param \CachetHQ\Cachet\Models\Component $component
  *
  * @throws \Exception
  *
  * @return \CachetHQ\Cachet\Models\Component
  */
 public function postUpdateComponent(Component $component)
 {
     if (!$component->update(Binput::except(['_token']))) {
         throw new Exception(trans('dashboard.components.edit.failure'));
     }
     return $component;
 }
开发者ID:kulado,项目名称:Cachet,代码行数:16,代码来源:ApiController.php

示例2: postUpdateComponent

 /**
  * Updates a component with the entered info.
  *
  * @param \CachetHQ\Cachet\Models\Component $component
  *
  * @throws \Exception
  *
  * @return \CachetHQ\Cachet\Models\Component
  */
 public function postUpdateComponent(Component $component)
 {
     if (!$component->update(Binput::except(['_token']))) {
         throw new Exception('Failed to update the component.');
     }
     return $component;
 }
开发者ID:baa-archieve,项目名称:Cachet,代码行数:16,代码来源:DashAPIController.php

示例3: postUpdateProject

 /**
  * Updates a project with the entered info.
  *
  * @param \Gitamin\Models\Project $project
  *
  * @throws \Exception
  *
  * @return \Gitamin\Models\Project
  */
 public function postUpdateProject(Project $project)
 {
     if (!$project->update(Binput::except(['_token']))) {
         throw new Exception(trans('dashboard.projects.edit.failure'));
     }
     return $project;
 }
开发者ID:xiuchanghu,项目名称:Gitamin,代码行数:16,代码来源:ApiController.php

示例4: postLogin

 /**
  * Logs the user in.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postLogin()
 {
     if (Auth::attempt(Binput::only(['email', 'password']))) {
         return Redirect::intended('dashboard');
     }
     Throttle::hit(Request::instance(), 10, 10);
     return Redirect::back()->withInput(Binput::except('password'))->with('error', 'Invalid email or password');
 }
开发者ID:baa-archieve,项目名称:Cachet,代码行数:13,代码来源:AuthController.php

示例5: postAddUser

 /**
  * Creates a new team member.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postAddUser()
 {
     try {
         $this->dispatch(new AddTeamMemberCommand(Binput::get('username'), Binput::get('password'), Binput::get('email'), Binput::get('level')));
     } catch (ValidationException $e) {
         return Redirect::route('dashboard.team.add')->withInput(Binput::except('password'))->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.add.failure')))->withErrors($e->getMessageBag());
     }
     return Redirect::route('dashboard.team.add')->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.add.success')));
 }
开发者ID:rafix82,项目名称:Cachet,代码行数:14,代码来源:TeamController.php

示例6: getGroups

 /**
  * Get all groups.
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function getGroups()
 {
     $groups = ComponentGroup::query();
     $groups->search(Binput::except(['sort', 'order', 'per_page']));
     if ($sortBy = Binput::get('sort')) {
         $direction = Binput::has('order') && Binput::get('order') == 'desc';
         $groups->sort($sortBy, $direction);
     }
     $groups = $groups->paginate(Binput::get('per_page', 20));
     return $this->paginator($groups, Request::instance());
 }
开发者ID:aksalj,项目名称:Cachet,代码行数:16,代码来源:ComponentGroupController.php

示例7: getIncidents

 /**
  * Get all incidents.
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function getIncidents()
 {
     $incidentVisibility = app(Guard::class)->check() ? 0 : 1;
     $incidents = Incident::where('visible', '>=', $incidentVisibility);
     $incidents->search(Binput::except(['sort', 'order', 'per_page']));
     if ($sortBy = Binput::get('sort')) {
         $direction = Binput::has('order') && Binput::get('order') == 'desc';
         $incidents->sort($sortBy, $direction);
     }
     $incidents = $incidents->paginate(Binput::get('per_page', 20));
     return $this->paginator($incidents, Request::instance());
 }
开发者ID:aksalj,项目名称:Cachet,代码行数:17,代码来源:IncidentController.php

示例8: postLogin

 /**
  * Logs the user in.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postLogin()
 {
     $loginData = Binput::only(['email', 'password']);
     // Validate login credentials.
     if (Auth::validate($loginData)) {
         // Log the user in for one request.
         Auth::once($loginData);
         // We probably want to add support for "Remember me" here.
         Auth::attempt($loginData);
         return Redirect::intended('dashboard');
     }
     return Redirect::route('auth.login')->withInput(Binput::except('password'))->withError(trans('forms.login.invalid'));
 }
开发者ID:xiuchanghu,项目名称:Gitamin,代码行数:18,代码来源:AuthController.php

示例9: 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

示例10: 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']);
     }
     try {
         $user->update($items);
     } catch (ValidationException $e) {
         return Redirect::back()->withInput(Binput::except('password'))->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.edit.failure')))->withErrors($e->getMessageBag());
     }
     return Redirect::back()->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success')));
 }
开发者ID:seanherron,项目名称:Cachet,代码行数:21,代码来源:TeamController.php

示例11: postSubscribers

 /**
  * Create a new subscriber.
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function postSubscribers()
 {
     $subscriberData = Binput::except('verify');
     try {
         $subscriber = Subscriber::create($subscriberData);
     } catch (Exception $e) {
         throw new BadRequestHttpException();
     }
     // If we're auto-verifying the subscriber, don't bother with this event.
     if (!Binput::get('verify')) {
         event(new CustomerHasSubscribedEvent($subscriber));
     }
     return $this->item($subscriber);
 }
开发者ID:RetinaInc,项目名称:Cachet,代码行数:19,代码来源:SubscriberController.php

示例12: comment

 /**
  * Create a new Comment row in the database table.
  *
  * @param  \KieranSmith\Facebook\Models\User
  * @param  \KieranSmith\Facebook\Models\Status
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function comment($statusOwner, $status)
 {
     $user = Auth::user();
     $statusOwnerID = $statusOwner['id'];
     $statusID = $status['id'];
     $theComment = Binput::except(['_token']);
     $commentData = ['status_id' => $statusID, 'user_id' => $user['id'], 'comment' => $theComment['comment']];
     $comment = Comment::create($commentData);
     if ($user['id'] == $statusOwnerID) {
         return Redirect::to('me');
     } else {
         return Redirect::to('person/' . $statusOwnerID);
     }
 }
开发者ID:kieransmith1993,项目名称:facebook2,代码行数:22,代码来源:StatusController.php

示例13: getComponents

 /**
  * Get all components.
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function getComponents()
 {
     if (app(Guard::class)->check()) {
         $components = Component::whereRaw('1 = 1');
     } else {
         $components = Component::enabled();
     }
     $components->search(Binput::except(['sort', 'order', 'per_page']));
     if ($sortBy = Binput::get('sort')) {
         $direction = Binput::has('order') && Binput::get('order') == 'desc';
         $components->sort($sortBy, $direction);
     }
     $components = $components->paginate(Binput::get('per_page', 20));
     return $this->paginator($components, Request::instance());
 }
开发者ID:uwm-appbrewery,项目名称:Cachet,代码行数:20,代码来源:ComponentController.php

示例14: putComponent

 /**
  * Update an existing component.
  *
  * @param \CachetHQ\Cachet\Models\Componet $component
  *
  * @return \CachetHQ\Cachet\Models\Component
  */
 public function putComponent(Component $component)
 {
     $component->update(Binput::except('tags'));
     if (!$component->isValid('updating')) {
         throw new BadRequestHttpException();
     }
     if (Binput::has('tags')) {
         $tags = preg_split('/ ?, ?/', Binput::get('tags'));
         // For every tag, do we need to create it?
         $componentTags = array_map(function ($taggable) use($component) {
             return Tag::firstOrCreate(['name' => $taggable])->id;
         }, $tags);
         $component->tags()->sync($componentTags);
     }
     return $this->item($component);
 }
开发者ID:n0mer,项目名称:Cachet,代码行数:23,代码来源:ComponentController.php

示例15: postSignup

 /**
  * Handle a signup request.
  *
  * @param string|null $code
  *
  * @return \Illuminate\View\View
  */
 public function postSignup($code = null)
 {
     if ($code === null) {
         throw new NotFoundHttpException();
     }
     $invite = Invite::where('code', '=', $code)->first();
     if (!$invite || $invite->is_claimed) {
         throw new BadRequestHttpException();
     }
     try {
         dispatch(new SignupUserCommand(Binput::get('username'), Binput::get('password'), Binput::get('email'), User::LEVEL_USER));
     } catch (ValidationException $e) {
         return Redirect::route('signup.invite', ['code' => $invite->code])->withInput(Binput::except('password'))->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('cachet.signup.failure')))->withErrors($e->getMessageBag());
     }
     dispatch(new ClaimInviteCommand($invite));
     return Redirect::route('status-page')->withSuccess(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.awesome'), trans('cachet.signup.success')));
 }
开发者ID:aksalj,项目名称:Cachet,代码行数:24,代码来源:SignupController.php


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