📜  延迟队列 laravel - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:53.629000             🧑  作者: Mango

代码示例1
$emails = array('emails' => [
           'amit@gmail.com',
           'sumit@gmail.com',
           'satpal@gmail.com',
           'rishav@gmail.com',
       ]
       );
       foreach ($emails as $email){
        $details = ['email' => $email];
        $emailJobs = (new TestSendEmail($details))->delay(10);
        $this->dispatch($emailJobs);
        echo "Queue Email Send Sucessfully";
       }