AgentIncome.php 815 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Modules\Finance\Jobs;
  3. use Illuminate\Support\Facades\Log;
  4. use Modules\Finance\Events\AgentIncome as AIE;
  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 AgentIncome implements ShouldQueue
  11. {
  12. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  13. /**
  14. * Create a new job instance.
  15. *
  16. * @return void
  17. */
  18. protected $message;
  19. public function __construct($message)
  20. {
  21. $this->message=$message;
  22. }
  23. /**
  24. * Execute the job.
  25. *
  26. * @return void
  27. */
  28. public function handle()
  29. {
  30. Log::info('yizhiyizhiyizhi');
  31. event(new AIE($this->message));
  32. }
  33. }