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