EventServiceProvider.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace App\Providers;
  3. use App\Events\PaymentEvent;
  4. use App\Events\UserUpdateCreditsEvent;
  5. use App\Listeners\CreateInvoice;
  6. use App\Listeners\UnsuspendServers;
  7. use App\Listeners\UserPayment;
  8. use App\Listeners\Verified as VerifiedListener;
  9. use Illuminate\Auth\Events\Registered;
  10. use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
  11. use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
  12. use SocialiteProviders\Manager\SocialiteWasCalled;
  13. use Illuminate\Auth\Events\Verified;
  14. class EventServiceProvider extends ServiceProvider
  15. {
  16. /**
  17. * The event listener mappings for the application.
  18. *
  19. * @var array
  20. */
  21. protected $listen = [
  22. Registered::class => [
  23. SendEmailVerificationNotification::class,
  24. ],
  25. UserUpdateCreditsEvent::class => [
  26. UnsuspendServers::class,
  27. ],
  28. PaymentEvent::class => [
  29. CreateInvoice::class,
  30. UserPayment::class,
  31. ],
  32. SocialiteWasCalled::class => [
  33. // ... other providers
  34. 'SocialiteProviders\\Discord\\DiscordExtendSocialite@handle',
  35. ],
  36. Verified::class => [
  37. VerifiedListener::class,
  38. ],
  39. ];
  40. /**
  41. * Register any events for your application.
  42. *
  43. * @return void
  44. */
  45. public function boot()
  46. {
  47. //
  48. }
  49. /**
  50. * Determine if events and listeners should be automatically discovered.
  51. *
  52. * @return bool
  53. */
  54. public function shouldDiscoverEvents()
  55. {
  56. return false;
  57. }
  58. }