<?php
 namespace App\EventHooks\System; use App\EventHooks\HookEvent; use App\Models\ClientProduct; class SslConfigurationRequired extends HookEvent { public const HOOK = 'SSLCertificateConfigurationRequired'; public function serviceId(): ?int { $id = $this->get('service_id') ?? $this->get('client_product_id'); return $id ? (int) $id : null; } public function service(): ?ClientProduct { $id = $this->serviceId(); return $id ? ClientProduct::find($id) : null; } public function domain(): ?string { return $this->get('domain'); } } 