CakePHP 3 : delete and update array from cookie
问题 I'm using CakePHP 3.2 for writing a shopping cart application. I'm using cookie to add items to the cart. Now I want to update and delete value from cart. so that if user clicks on the same product add to cart with a different quantity value the existing record will be deleted and new will be added to cart. This is my addToCart() method. public function addToCart() { $this->loadModel('Products'); if ($this->request->is('post')) { $p_id = $this->request->data('product_id'); $p_quantity = $this