title: Laravel Cart Updating the latest product only
body: <p>Trying to update the quantity of the products of cart.But only the last element of the cart is updating,others are not updating also other products are getting same quantity as last one.</p>
  
  <pre><code>public function update_cart(Request $request,$Fid)
  {   
  
      $data5=array();
      $data5['qty']=$request-&gt;qty;
  
      //print_r($data5['qty']);
      DB::table('cart')
       -&gt;where('Fid',$Fid)
       -&gt;update($data5);
       return redirect('/customer_show_cart');
  
  }
  </code></pre>
  
  <p>Blade.php here in a foreach loop</p>
  
  <pre><code>     @foreach ($all_cart_product as $cart_product)
       &lt;td&gt;
  &lt;input type="number" style="width: 10%;" name="qty" min="1"  value="{{$cart_product-&gt;qty}}"&gt; 
  &lt;/td&gt;
  
  &lt;td&gt;
  
  &lt;button class="btn btn-default"  formaction="{{URL::to('/update_cart/'.$cart_product-&gt;Fid)}}"  
  type="submit" style="background-color: green;color: white;"&gt;
      &lt;i class="fa fa-refresh"&gt; &lt;/i&gt;
  &lt;/button&gt; 
  </code></pre>