public function acceptCookies()
    {
        $this->response = $this->response->withCookie((new Cookie('cookies-policy', true))->withNeverExpire());

        return $this->redirect($this->referer(['_name' => 'homepage'], true));
    }
public function acceptCookies()
    {
        $this->response = $this->response->withCookie((new Cookie('cookies-policy', true))->withNeverExpire());

        return $this->redirect($this->referer(['_name' => 'homepage'], true));
    }
public function acceptCookies ( ) { $ this -> response = $ this -> response -> withCookie ( ( new Cookie ( 'cookies-policy' , true ) ) -> withNeverExpire ( ) ) ; return $ this -> redirect ( $ this -> referer ( [ '_name' => 'homepage' ] , true ) ) ; }
Accept cookies policy.
It sets the cookie to remember the user accepted the cookie policy and
redirects
@return \Cake\Network\Response|null
Accept cookies policy . It sets the cookie to remember the user accepted the cookie policy and redirects