Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

EventServiceProvider.php 1.0KB

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