first(); Order::chunk(100, function ($orders) use ($currency) { foreach ($orders as $order) { $order->price_products = $order->price_products * $currency->dollar; $order->price_delivery = $order->price_delivery * $currency->dollar; $order->price_total = $order->price_total * $currency->dollar; $order->price_master = $order->price_master * $currency->dollar; $order->save(); } }); } }