Пример #1
0
 /**
  * Determine if the configured session driver is persistent.
  *
  * @param  array|null  $config
  * @return bool
  */
 protected function sessionIsPersistent(array $config = null)
 {
     // Some session drivers are not persistent, such as the test array driver or even
     // when the developer don't have a session driver configured at all, which the
     // session cookies will not need to get set on any responses in those cases.
     $config = $config ?: $this->manager->getSessionConfig();
     return !in_array($config['driver'], array(null, 'array'));
 }
Пример #2
0
 /**
  * Get the session configuration.
  *
  * @return array 
  * @static 
  */
 public static function getSessionConfig()
 {
     return \Illuminate\Session\SessionManager::getSessionConfig();
 }
 /**
  * Determine if the configured session driver is persistent.
  *
  * @param  array|null  $config
  * @return bool
  */
 protected function sessionIsPersistent(array $config = null)
 {
     $config = $config ?: $this->manager->getSessionConfig();
     return !in_array($config['driver'], array(null, 'array'));
 }
 /**
  * Get the cookie lifetime in seconds.
  *
  * @return int
  */
 protected function getCookieExpirationDate()
 {
     $config = $this->manager->getSessionConfig();
     return $config['expire_on_close'] ? 0 : Carbon::now()->addMinutes($config['lifetime']);
 }