public function cookie(
        $key,
        $value = '',
        $expiry = null,
        $path = '/',
        $domain = null,
        $secure = false,
        $httponly = false
    ) {
        if (null === $expiry) {
            $expiry = time() + (3600 * 24 * 30);
        }

        $this->cookies->set(
            $key,
            new ResponseCookie($key, $value, $expiry, $path, $domain, $secure, $httponly)
        );

        return $this;
    }
public function cookie(
        $key,
        $value = '',
        $expiry = null,
        $path = '/',
        $domain = null,
        $secure = false,
        $httponly = false
    ) {
        if (null === $expiry) {
            $expiry = time() + (3600 * 24 * 30);
        }

        $this->cookies->set(
            $key,
            new ResponseCookie($key, $value, $expiry, $path, $domain, $secure, $httponly)
        );

        return $this;
    }
public function cookie ( $ key , $ value = '' , $ expiry = null , $ path = '/' , $ domain = null , $ secure = false , $ httponly = false ) { if ( null === $ expiry ) { $ expiry = time ( ) + ( 3600 * 24 * 30 ) ; } $ this -> cookies -> set ( $ key , new ResponseCookie ( $ key , $ value , $ expiry , $ path , $ domain , $ secure , $ httponly ) ) ; return $ this ; }
Sets a response cookie

@param string $key           The name of the cookie
@param string $value         The value to set the cookie with
@param int $expiry           The time that the cookie should expire
@param string $path          The path of which to restrict the cookie
@param string $domain        The domain of which to restrict the cookie
@param boolean $secure       Flag of whether the cookie should only be sent over a HTTPS connection
@param boolean $httponly     Flag of whether the cookie should only be accessible over the HTTP protocol
@return AbstractResponse
Sets a response cookie