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


PHP Redirector::intended方法代码示例

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


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

示例1: handle

 /**
  * Handle the form.
  *
  * @param LoginFormBuilder  $builder
  * @param UserAuthenticator $authenticator
  * @param Redirector        $redirect
  */
 public function handle(LoginFormBuilder $builder, UserAuthenticator $authenticator, Redirector $redirect)
 {
     if (!($user = $builder->getUser())) {
         return;
     }
     $authenticator->login($user, $builder->getFormValue('remember_me'));
     $builder->setFormResponse($redirect->intended($builder->getFormOption('redirect', '/')));
 }
开发者ID:AkibaTech,项目名称:users-module,代码行数:15,代码来源:LoginFormHandler.php

示例2: handle

 /**
  * Handle the form.
  *
  * @param LoginFormBuilder  $builder
  * @param UserAuthenticator $authenticator
  * @param UserSecurity      $security
  * @param Redirector        $redirect
  */
 public function handle(LoginFormBuilder $builder, UserAuthenticator $authenticator, UserSecurity $security, Redirector $redirect)
 {
     if (!($user = $builder->getUser())) {
         return;
     }
     $response = $security->check($user);
     if ($response instanceof Response) {
         $authenticator->logout($user);
         $builder->setFormResponse($response);
         return;
     }
     $authenticator->login($user, $builder->getFormValue('remember_me'));
     $builder->setFormResponse($redirect->intended($builder->getFormOption('redirect', '/')));
 }
开发者ID:jacksun101,项目名称:users-module,代码行数:22,代码来源:LoginFormHandler.php

示例3: postIndex

 /**
  * Show the login form
  *
  * @return mixed
  */
 public function postIndex()
 {
     // Pick up the honeypot field to stop bots, return to the login screen, no message
     if ($this->request->get('potter')) {
         return $this->redirect->to('auth/login')->withInput();
     }
     if (!$this->validator->with($this->request->all())->passes()) {
         return $this->redirect->to('auth/login')->withErrors($this->validator->errors());
     }
     if ($this->auth->attempt(['username' => $this->request->get('username'), 'password' => $this->request->get('password')])) {
         return $this->redirect->intended('/');
     }
     $this->session->flash('failed', trans('auth.incorrect_username_or_password'));
     return $this->redirect->to('auth/login')->withInput();
 }
开发者ID:jraymundoyrockdev,项目名称:api-gfccm-systems,代码行数:20,代码来源:AuthController.php

示例4: intended

 /**
  * Create a new redirect response to the previously intended location.
  *
  * @param string $default
  * @param int $status
  * @param array $headers
  * @param bool $secure
  * @return \Illuminate\Http\RedirectResponse 
  * @static 
  */
 public static function intended($default = '/', $status = 302, $headers = array(), $secure = null)
 {
     return \Illuminate\Routing\Redirector::intended($default, $status, $headers, $secure);
 }
开发者ID:satriashp,项目名称:tour,代码行数:14,代码来源:_ide_helper.php

示例5: redirectToIntended

 /**
  * Create a new redirect response to the previously intended location.
  *
  * @param  string  $default
  * @param  int     $status
  * @param  array   $headers
  * @param  bool    $secure
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function redirectToIntended($default = '/', $status = 302, $headers = array(), $secure = null)
 {
     return $this->redirector->intended($default, $status, $headers, $secure);
 }
开发者ID:visualturk,项目名称:framework,代码行数:13,代码来源:ResponseFactory.php


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