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
        );
    }
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
        );
    }
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 ) ; }
Create a Cookie instance for the specified Session and configuration.

@param  array  $config
@param  \Nova\Session\SessionInterface  $session
@return \Symfony\Component\HttpFoundation\Cookie
Create a Cookie instance for the specified Session and configuration .