AuditMediaDeal.php 648 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Listeners;
  3. use App\Services\Violation\ViolationAbstract;
  4. use Illuminate\Queue\InteractsWithQueue;
  5. use Illuminate\Contracts\Queue\ShouldQueue;
  6. class AuditMediaDeal implements ShouldQueue
  7. {
  8. use InteractsWithQueue;
  9. /**
  10. * Create the event listener.
  11. *
  12. * @return void
  13. */
  14. public function __construct()
  15. {
  16. }
  17. /**
  18. * Handle the event.
  19. *
  20. * @param \App\Events\AuditMediaDeal $event
  21. * @return void
  22. */
  23. public function handle($event)
  24. {
  25. $media = $event->media;
  26. $violation = ViolationAbstract::make($media);
  27. $violation->handle();
  28. }
  29. }