if(! $this->response->hasCookie('test')) { $cookie = [ 'name' => 'test', 'value' => 'The Value', 'expire' => '86500', 'path' => '/', 'secure' => TRUE, 'httponly' => FALSE ]; $show = $this->response->setCookie($cookie); echo 'cookie set!'; }