TestServiceProvider.php 536 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Module\Game\Providers;
  3. use App\Module\Game\Events\TestEvent;
  4. use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
  5. class TestServiceProvider extends ServiceProvider
  6. {
  7. /**
  8. * 事件到监听器的映射
  9. *
  10. * @var array<class-string, array<int, class-string>>
  11. */
  12. protected $listen = [
  13. TestEvent::class => [
  14. ],
  15. ];
  16. /**
  17. * 注册任何事件监听器
  18. */
  19. public function boot(): void
  20. {
  21. parent::boot();
  22. }
  23. }