<?php
 namespace App\EventHooks\Service; use App\EventHooks\HookEvent; use App\Models\ClientProduct; class ConfigOptionsUpgraded extends HookEvent { public const HOOK = 'AfterConfigOptionsUpgrade'; public function service(): ?ClientProduct { $id = $this->get('serviceid') ?? $this->get('upgradeid'); return $id ? ClientProduct::find($id) : null; } public function configOptions(): array { $opts = $this->get('configoptions'); return is_array($opts) ? $opts : []; } } 