EventServiceProvider.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App\Providers;
  3. use App\Events\OrderCreated;
  4. use App\Events\OrderPaid;
  5. use App\Listeners\AddCryptoBonusOnOrderPaid;
  6. use App\Listeners\BindCouponToOrder;
  7. use App\Listeners\ProcessCouponOnOrderPaid;
  8. use Illuminate\Support\Facades\Event;
  9. use Illuminate\Auth\Events\Registered;
  10. use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
  11. use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
  12. class EventServiceProvider extends ServiceProvider
  13. {
  14. /**
  15. * The event listener mappings for the application.
  16. *
  17. * @var array
  18. */
  19. protected $listen = [
  20. Registered::class => [
  21. SendEmailVerificationNotification::class,
  22. ],
  23. OrderCreated::class => [
  24. BindCouponToOrder::class,
  25. ],
  26. OrderPaid::class => [
  27. ProcessCouponOnOrderPaid::class,
  28. AddCryptoBonusOnOrderPaid::class,
  29. ],
  30. ];
  31. /**
  32. * Register any events for your application.
  33. *
  34. * @return void
  35. */
  36. public function boot()
  37. {
  38. parent::boot();
  39. //
  40. }
  41. }