EventServiceProvider.php 902 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App\Providers;
  3. use App\Events\UserLoginEvents;
  4. use App\Listeners\UserLoginLogListener;
  5. use App\Models\User;
  6. use Illuminate\Auth\Events\Registered;
  7. use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
  8. use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
  9. use Illuminate\Support\Facades\Event;
  10. class EventServiceProvider extends ServiceProvider
  11. {
  12. /**
  13. * The event 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. UserLoginEvents::class=>[
  22. UserLoginLogListener::class
  23. ]
  24. ];
  25. /**
  26. * Register any events for your application.
  27. *
  28. * @return void
  29. */
  30. public function boot()
  31. {
  32. //
  33. }
  34. }