<?php
 namespace App\Providers; use App\Core\Hook\HookManager; use Illuminate\Support\ServiceProvider; class HookEventServiceProvider extends ServiceProvider { public function boot(HookManager $hooks): void { foreach (config('hook_events', []) as $hook => $eventClass) { $hooks->listenAction($hook, function (array $ctx) use ($eventClass) { event(new $eventClass($ctx)); }); } } } 