EventServiceProvider.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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;
  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. class EventServiceProvider extends ServiceProvider
  14. {
  15. /**
  16. * The event listener mappings for the application.
  17. *
  18. * @var array
  19. */
  20. protected $listen = [
  21. Registered::class => [
  22. SendEmailVerificationNotification::class,
  23. ],
  24. UserUpdateCreditsEvent::class => [
  25. UnsuspendServers::class,
  26. ],
  27. PaymentEvent::class => [
  28. CreateInvoice::class,
  29. UserPayment::class,
  30. ],
  31. SocialiteWasCalled::class => [
  32. // ... other providers
  33. 'SocialiteProviders\\Discord\\DiscordExtendSocialite@handle',
  34. ],
  35. 'Illuminate\Auth\Events\Verified' => [
  36. Verified::class,
  37. ],
  38. ];
  39. /**
  40. * Register any events for your application.
  41. *
  42. * @return void
  43. */
  44. public function boot()
  45. {
  46. //
  47. }
  48. /**
  49. * Determine if events and listeners should be automatically discovered.
  50. *
  51. * @return bool
  52. */
  53. public function shouldDiscoverEvents()
  54. {
  55. return false;
  56. }
  57. }