I am new in cakephp 3.0. i have successfull created a cookie but i want to destroy that cookie after one minute. i have done so far:-
public function register_cookie(){
$data = "Hello world!";
$this->Cookie->write('dataFetch', $data, true, time() + (60 * 1));
}
public function getcookie() {
$cookiedata = $this->Cookie->read('dataFetch');
echo $cookiedata;
}
but when i come after one minute in getCookie function it still prints i.e. "Hello World" i want after one minute cookie is expired. Thanks in advance :)