title: Laravel Affected Rows
body: <p>I have shopping cart. And i'm updating the quantites of cart in laravel 5.1</p>
  
  <p>Here is my code...</p>
  
  <pre><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-&gt;productInUserCart($product_id, $user_id)-&gt;update(['quantity' =&gt; $quantity]);
  }
  </code></pre>
  
  <p>I want to get affected rows. How can i do that in laravel 5.1 ?</p>