restore composer.json, add mysqli extension

This commit is contained in:
2026-04-15 17:02:52 +05:00
commit 77cf56a348
4317 changed files with 1397107 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Console\Commands;
use App\Models\Currency;
use App\Models\Order;
use Illuminate\Console\Command;
class OrderCurrencyChange extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:order-currency-change';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
$currency = Currency::latest()->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();
}
});
}
}