update email template

This commit is contained in:
baodev0
2026-09-09 16:56:22 +07:00
parent d3d9f76ba0
commit 2365ef72e9
210 changed files with 6335 additions and 4688 deletions
@@ -0,0 +1,19 @@
<?php
namespace App\Integrations\Whmcs\Support;
use Illuminate\Support\Facades\DB;
/** Resolves a WHMCS `tblhosting.id` to the local `order_items.id` via `legacy_id` (1:1, same source row). */
class OrderItemIdResolver
{
/** @var array<int, int>|null */
private static ?array $map = null;
public function resolve(int $legacyHostingId): ?int
{
self::$map ??= DB::table('order_items')->whereNotNull('legacy_id')->pluck('id', 'legacy_id')->all();
return self::$map[$legacyHostingId] ?? null;
}
}