I have shopping cart. And i'm updating the quantites of cart in laravel 5.1
Here is my code...
/**
* @desc Updates User Cart
* @param integer $product_id
* @param integer $user_id
* @param integer $quantity
* @return mixed
*/
public function updateUserCart($product_id, $user_id, $quantity){
return $this->productInUserCart($product_id, $user_id)->update(['quantity' => $quantity]);
}
I want to get affected rows. How can i do that in laravel 5.1 ?