You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EventServiceProvider.php 1.4KB

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