OperationLog.php 794 B

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