EachLikeReport.php 719 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Listeners;
  3. use App\Jobs\GrowingIO\EachLikeReportJob;
  4. use App\Jobs\GrowingIO\FeedEachLikeReportJob;
  5. use Illuminate\Queue\InteractsWithQueue;
  6. use Illuminate\Contracts\Queue\ShouldQueue;
  7. class EachLikeReport
  8. {
  9. /**
  10. * Create the event listener.
  11. *
  12. * @return void
  13. */
  14. public function __construct()
  15. {
  16. //
  17. }
  18. /**
  19. * Handle the event.
  20. *
  21. * @param object $event
  22. * @return void
  23. */
  24. public function handle($event)
  25. {
  26. //
  27. $userId = $event->uid;
  28. $likeUserId = $event->isLikeUid;
  29. EachLikeReportJob::dispatch($userId, $likeUserId, 1);
  30. EachLikeReportJob::dispatch($likeUserId, $userId, 0);
  31. }
  32. }