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