<?php
 namespace App\EventHooks\Client; use App\EventHooks\HookEvent; use App\Models\Admin; class AdminUserLoggedOut extends HookEvent { public const HOOK = 'UserLogout'; public function user(): ?Admin { $u = $this->get('admin'); if ($u instanceof Admin) { return $u; } $id = $this->get('user_id') ?? $this->get('userid'); return $id ? Admin::find($id) : null; } public function username(): ?string { return $this->get('username'); } } 