return row on update

When updating a cartItem it should be returned since updating it might
change it’s ID
This commit is contained in:
Gregory Claeyssens
2016-11-02 14:34:49 +01:00
parent 143d51b22b
commit a3838c037b

View File

@@ -116,7 +116,7 @@ class Cart
* *
* @param string $rowId * @param string $rowId
* @param mixed $qty * @param mixed $qty
* @return void * @return \Gloudemans\Shoppingcart\CartItem
*/ */
public function update($rowId, $qty) public function update($rowId, $qty)
{ {
@@ -151,6 +151,8 @@ class Cart
$this->events->fire('cart.updated', $cartItem); $this->events->fire('cart.updated', $cartItem);
$this->session->put($this->instance, $content); $this->session->put($this->instance, $content);
return $cartItem;
} }
/** /**