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


PHP Store::keep方法代码示例

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


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

示例1: validate

 /**
  * Validate what is passed into the age gate
  *
  * @param array $data
  * @return $this|Validation|\Illuminate\Http\RedirectResponse
  */
 public function validate(array $data)
 {
     $this->validation = $this->validator->make($data, $this->getValidationRules(), $this->getValidationMessages());
     if ($this->validation->fails()) {
         $failed = $this->validation->failed();
         $validExceptTooYoung = array_get($failed, 'dob.Before');
         $canTryAgain = config('laravel-avp.can_try_again');
         $toRedirect = config('laravel-avp.redirect_on_error');
         $redirectURL = config('laravel-avp.redirect_url');
         if (substr($data['dob'], 0, 4) > date('Y')) {
             return redirect()->action('AVPController@agegate')->withErrors($this->validation->messages())->withInput();
         } else {
             if ($validExceptTooYoung && $toRedirect) {
                 return redirect($redirectURL);
             } else {
                 if ($validExceptTooYoung && !$canTryAgain) {
                     $this->session->put('laravel-avp.previous_too_young', true);
                 } else {
                     $this->session->keep('url.intended');
                 }
             }
         }
         return redirect()->action('AVPController@agegate')->withErrors($this->validation->messages())->withInput();
     }
     return $this->setCookie($data['remember']);
 }
开发者ID:fastwebmedia,项目名称:laravel-avp,代码行数:32,代码来源:Validation.php

示例2: keep

 /**
  * Reflash a subset of the current flash data.
  *
  * @param array|mixed $keys
  * @return void 
  * @static 
  */
 public static function keep($keys = null)
 {
     \Illuminate\Session\Store::keep($keys);
 }
开发者ID:satriashp,项目名称:tour,代码行数:11,代码来源:_ide_helper.php

示例3: reflash

 public function reflash($name)
 {
     $this->sessionManager->keep($this->getName($name));
 }
开发者ID:laravel-commode,项目名称:navigation-bag,代码行数:4,代码来源:NavigationBag.php


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