Answer the question
In order to leave comments, you need to log in
Why don't cookies work in Phalcon?
The standard function of creating cookies does not work
. What is the problem
Answer the question
In order to leave comments, you need to log in
You do not have a predefined cookie service. Or call via Phalcon\Http\Response\Cookies
$cookies = new Phalcon\Http\Response\Cookies();
$cookies->set(
'remember-me',
'some value',
time() + 15 * 86400
);
or through the service$di->set(
'cookies',
function () {
$cookies = new Phalcon\Http\Response\Cookies();
$cookies->useEncryption(false);
return $cookies;
}
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question