I am having problems working with request cookies on my project. I have a cookie collection with about 3 values a, b, and c. Then I try the following for instance:
$cookieCollection = $this->getRequest()->getCookieCollection();
if ($cookieCollection->has('b')) {
$cookieCollection->remove('b');
}
After doing this the ‘b’ is removed only from this instance:
$cookieCollection
.
But it is still there in
$this->getRequest()->getCookieCollection();
Now how do I update the CookieCollection so that ‘b’ will no longer exist anywhere in the entire site?