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