<?php
namespace App\Jobs;
use App\Service\SendCode;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use function GuzzleHttp\Psr7\str;
class ProcessPodcast implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $object;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($object)
{
$this->object = $object;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
(new SendCode())->sendMessage($this->object['phone'],$this->object['ticket']);
}
}
Laravel 队列发送消息
最新推荐文章于 2022-11-23 18:34:06 发布