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