update email template
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Integrations\Domain\Support;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/** Resolves a source `dns_manager_servers.id` to the local row via `legacy_id`. */
|
||||
class DnsServerIdResolver
|
||||
{
|
||||
/** @var array<int, int>|null */
|
||||
private static ?array $map = null;
|
||||
|
||||
public function resolve(int $legacyServerId): ?int
|
||||
{
|
||||
self::$map ??= DB::table('dns_manager_servers')->whereNotNull('legacy_id')->pluck('id', 'legacy_id')->all();
|
||||
|
||||
return self::$map[$legacyServerId] ?? null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user