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