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,21 @@
<?php
namespace App\Services\Dashboard\Region;
use App\Models\Region;
class RegionService
{
public static function deliveryPrice(Region $region, $data)
{
$toDelete = $region->deliveryPrice()->whereNotIn('power_id', array_column($data, 'power_id'))->get();
$toDelete->each->delete();
foreach ($data as $item) {
$region->deliveryPrice()->updateOrCreate(
['power_id' => $item['power_id']],
['price' => $item['price']]
);
}
}
}