protected function writeSessionTo(Response $response)
    {
        // TODO: Take these values from config
        $lifetime = Carbon::now()->addMinutes(120);
        $path = '/';
        $domain = null;
        $secure = false;

        $response->headers->setCookie(new Cookie(
            $this->session->getName(),
            $this->session->getId(),
            $lifetime,
            $path,
            $domain,
            $secure
        ));
    }
protected function writeSessionTo(Response $response)
    {
        // TODO: Take these values from config
        $lifetime = Carbon::now()->addMinutes(120);
        $path = '/';
        $domain = null;
        $secure = false;

        $response->headers->setCookie(new Cookie(
            $this->session->getName(),
            $this->session->getId(),
            $lifetime,
            $path,
            $domain,
            $secure
        ));
    }
protected function writeSessionTo ( Response $ response ) { // TODO: Take these values from config $ lifetime = Carbon :: now ( ) -> addMinutes ( 120 ) ; $ path = '/' ; $ domain = null ; $ secure = false ; $ response -> headers -> setCookie ( new Cookie ( $ this -> session -> getName ( ) , $ this -> session -> getId ( ) , $ lifetime , $ path , $ domain , $ secure ) ) ; }
Write the session cookie to the response.

@param \Symfony\Component\HttpFoundation\Response $response
@return void
Write the session cookie to the response .