| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App\Module\UrausSys\Providers;
- use App\Module\UrausSys\Events\TestEvent;
- use App\Module\UrausSys\Listeners\TestEventListener;
- use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
- class TestServiceProvider extends ServiceProvider
- {
- /**
- * 事件到监听器的映射
- *
- * @var array<class-string, array<int, class-string>>
- */
- protected $listen = [
- TestEvent::class => [
- TestEventListener::class,
- ],
- ];
- /**
- * 注册任何事件监听器
- */
- public function boot(): void
- {
- parent::boot();
- }
- }
|