<?php
 namespace App\EventHooks\Domain; use App\EventHooks\HookEvent; use App\Models\ClientDomain; class DomainTransferCompleted extends HookEvent { public const HOOK = 'DomainTransferCompleted'; public function domain(): ?ClientDomain { $d = $this->get('domain'); if ($d instanceof ClientDomain) { return $d; } $id = $this->get('domain_id') ?? (is_array($d) ? ($d['id'] ?? null) : null); return $id ? ClientDomain::find($id) : null; } public function registrar(): ?string { return $this->get('registrar'); } } 