How to retrieve cookie – Drupal Answers

In D8 Project, Cookie save p-nid1, p-nid2, p-nid3 (1, 2, 3 is node id). Cookie save with Drupal.visitor.p-nid1, Drupal.visitor.p-nid2, Drupal.visitor.p-nid3. But when get cookie $nid = $node->id(); $cookieName = ‘p-nid’.$nid;…