new ExtJsonDecoder(true)] ); foreach ($items as $data) { // item_id is product id, I need to find product and update price_amount to $data['value'] and cost_amount to $data['cost_value'] DB::table($table)->where('id', $data['item_id'])->update([ 'price_amount' => $data['value'], 'cost_amount' => $data['cost_value'], ]); } }); } }