Answers for "laravel eloquent update quantity"

PHP
0

laravel eloquent update quantity

foreach ($items as $item) {
    $product = Product::find($item['id']);
    $product->decrement('quantity', $item['qty']);
}
Posted by: Guest on November-05-2020

Browse Popular Code Answers by Language