<?php
 namespace App\EventHooks\Service; use App\EventHooks\HookEvent; use App\Models\ClientProduct; class CancellationRequested extends HookEvent { public const HOOK = 'CancellationRequest'; public function service(): ?ClientProduct { $id = $this->get('service_id') ?? $this->get('relid'); return $id ? ClientProduct::find($id) : null; } public function reason(): ?string { return $this->get('reason'); } public function type(): ?string { return $this->get('type'); } } 