update quantity eloquent code example
Example: laravel eloquent update quantity
foreach ($items as $item) {
$product = Product::find($item['id']);
$product->decrement('quantity', $item['qty']);
}
foreach ($items as $item) {
$product = Product::find($item['id']);
$product->decrement('quantity', $item['qty']);
}