EventServiceProvider.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace App\Providers;
  3. use App\Events\ObjectActionCreate;
  4. use App\Listeners\SendActionBrowserNotification;
  5. use App\Listeners\SendActionEmailNotification;
  6. use Illuminate\Auth\Events\Registered;
  7. use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
  8. use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
  9. use Illuminate\Support\Facades\Event;
  10. class EventServiceProvider extends ServiceProvider
  11. {
  12. /**
  13. * The event to listener mappings for the application.
  14. *
  15. * @var array<class-string, array<int, class-string>>
  16. */
  17. protected $listen = [
  18. Registered::class => [
  19. SendEmailVerificationNotification::class,
  20. ],
  21. ObjectActionCreate::class => [
  22. SendActionBrowserNotification::class,
  23. SendActionEmailNotification::class,
  24. ]
  25. ];
  26. /**
  27. * Register any events for your application.
  28. */
  29. public function boot(): void
  30. {
  31. }
  32. /**
  33. * Determine if events and listeners should be automatically discovered.
  34. */
  35. public function shouldDiscoverEvents(): bool
  36. {
  37. return false;
  38. }
  39. }