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