laravel eloquent update example
Example 1: update query in laravel eloquent
$data = DB::table('cart')
->where('crt_id', $id)
->update(['crt_status' =>'0']);
Example 2: laravel eloquent update quantity
foreach ($items as $item) {
$product = Product::find($item['id']);
$product->decrement('quantity', $item['qty']);
}