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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Providers;
  3. use App\Models\Banking\Account;
  4. use App\Observers\AccountObserver;
  5. use Illuminate\Auth\Events\Registered;
  6. use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
  7. use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
  8. use Illuminate\Support\Facades\Event;
  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. ];
  21. /**
  22. * Register any events for your application.
  23. */
  24. public function boot(): void
  25. {
  26. //
  27. }
  28. /**
  29. * Determine if events and listeners should be automatically discovered.
  30. */
  31. public function shouldDiscoverEvents(): bool
  32. {
  33. return false;
  34. }
  35. /**
  36. * The model observers for the application.
  37. *
  38. * @var array
  39. */
  40. protected $observers = [
  41. Account::class => [AccountObserver::class],
  42. ];
  43. }