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.6KB

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