本文整理汇总了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']);
}
示例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);
}
示例3: reflash
public function reflash($name)
{
$this->sessionManager->keep($this->getName($name));
}