From a3838c037b56d57c1b439927e8c8898d3713c2b4 Mon Sep 17 00:00:00 2001 From: Gregory Claeyssens Date: Wed, 2 Nov 2016 14:34:49 +0100 Subject: [PATCH] return row on update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When updating a cartItem it should be returned since updating it might change it’s ID --- src/Cart.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Cart.php b/src/Cart.php index ccdbead..09853db 100644 --- a/src/Cart.php +++ b/src/Cart.php @@ -116,7 +116,7 @@ class Cart * * @param string $rowId * @param mixed $qty - * @return void + * @return \Gloudemans\Shoppingcart\CartItem */ public function update($rowId, $qty) { @@ -151,6 +151,8 @@ class Cart $this->events->fire('cart.updated', $cartItem); $this->session->put($this->instance, $content); + + return $cartItem; } /**