original_string: protected function createCookie(array $config, SessionInterface $session)
      {
          $expireOnClose = Arr::get($config, 'expireOnClose', false);
  
          if ($expireOnClose !== false) {
              $lifetime = Arr::get($config, 'lifetime', 180);
  
              $expire = Carbon::now()->addMinutes($lifetime);
          } else {
              $expire = 0;
          }
  
          $secure = Arr::get($config, 'secure', false);
  
          return new Cookie(
              $session->getName(),
              $session->getId(),
              $expire,
              $config['path'],
              $config['domain'],
              $secure
          );
      }
code: protected function createCookie(array $config, SessionInterface $session)
      {
          $expireOnClose = Arr::get($config, 'expireOnClose', false);
  
          if ($expireOnClose !== false) {
              $lifetime = Arr::get($config, 'lifetime', 180);
  
              $expire = Carbon::now()->addMinutes($lifetime);
          } else {
              $expire = 0;
          }
  
          $secure = Arr::get($config, 'secure', false);
  
          return new Cookie(
              $session->getName(),
              $session->getId(),
              $expire,
              $config['path'],
              $config['domain'],
              $secure
          );
      }
code_tokens: protected function createCookie ( array $ config , SessionInterface $ session ) { $ expireOnClose = Arr :: get ( $ config , 'expireOnClose' , false ) ; if ( $ expireOnClose !== false ) { $ lifetime = Arr :: get ( $ config , 'lifetime' , 180 ) ; $ expire = Carbon :: now ( ) -> addMinutes ( $ lifetime ) ; } else { $ expire = 0 ; } $ secure = Arr :: get ( $ config , 'secure' , false ) ; return new Cookie ( $ session -> getName ( ) , $ session -> getId ( ) , $ expire , $ config [ 'path' ] , $ config [ 'domain' ] , $ secure ) ; }
docstring: Create a Cookie instance for the specified Session and configuration.
  
  @param  array  $config
  @param  \Nova\Session\SessionInterface  $session
  @return \Symfony\Component\HttpFoundation\Cookie
docstring_tokens: Create a Cookie instance for the specified Session and configuration .