<?php
 namespace App\EventHooks\Client; use App\EventHooks\HookEvent; use App\Models\ClientContact; class ContactDeleted extends HookEvent { public const HOOK = 'ContactDelete'; public function contact(): ?ClientContact { $c = $this->get('contact'); if ($c instanceof ClientContact) { return $c; } $id = $this->get('contact_id') ?? $this->get('contactid'); return $id ? ClientContact::find($id) : null; } } 