EventServiceProvider.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace App\Providers;
  3. use App\Listeners\Command;
  4. use Illuminate\Auth\Events\Registered;
  5. use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
  6. use Illuminate\Console\Events\CommandFinished;
  7. use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
  8. use Illuminate\Routing\Events\RouteMatched;
  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. RouteMatched::class => [
  22. \App\Listeners\RouteMatched::class
  23. ],
  24. CommandFinished::class => [
  25. Command::class
  26. ]
  27. ];
  28. /**
  29. * Register any events for your application.
  30. *
  31. * @return void
  32. */
  33. public function boot()
  34. {
  35. //
  36. }
  37. /**
  38. * Determine if events and listeners should be automatically discovered.
  39. *
  40. * @return bool
  41. */
  42. public function shouldDiscoverEvents()
  43. {
  44. return false;
  45. }
  46. }