1
I created the following cookie in the Locale controller:
$cookie = new \Zend\Http\Header\SetCookie('localidade_id', $localidade->getIdentificador(), time() + 3600);
However, when trying to access it in the Contact controller:
$getcookie = $request->getCookie();
$getcookie->offsetGet('localidade_id');
return is NULL. But if access is done in the Locale controller, I have a valid value.
It’s my first time using cookies with ZF2, so I don’t know if there’s anything wrong. If anyone can help me.
Thank you. That was the problem
– franM