BoadcastDetectionJob.php 787 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Jobs;
  3. use App\Models\BlockItems;
  4. use App\Servers\ContractServer;
  5. use Illuminate\Bus\Queueable;
  6. use Illuminate\Queue\SerializesModels;
  7. use Illuminate\Queue\InteractsWithQueue;
  8. use Illuminate\Contracts\Queue\ShouldQueue;
  9. use Illuminate\Foundation\Bus\Dispatchable;
  10. class BoadcastDetectionJob implements ShouldQueue
  11. {
  12. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  13. private $blockItem;
  14. /**
  15. * Create a new job instance.
  16. *
  17. * @return void
  18. */
  19. public function __construct(BlockItems $blockItem)
  20. {
  21. $this->blockItem=$blockItem;
  22. }
  23. /**
  24. * Execute the job.
  25. *
  26. * @return void
  27. */
  28. public function handle()
  29. {
  30. ContractServer::creatServer()->broadcastDetection();
  31. }
  32. }