Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel eloquent update quantity

foreach ($items as $item) {
    $product = Product::find($item['id']);
    $product->decrement('quantity', $item['qty']);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #eloquent #update #quantity
ADD COMMENT
Topic
Name
6+8 =