phpartisanmake:jobSendEmail--queued生成后在App\Jobs
2 回答
慕桂英546537
TA贡献1848条经验 获得超10个赞
php$mailer->send('emails.reminder',['user'=>$this->user],function($m)use($email){$m->to($email,'zan')->subject('发送成功');});
扬帆大鱼
TA贡献1799条经验 获得超9个赞
改下jobnamespaceApp\Jobs;useApp\User;useApp\Jobs\Job;useIlluminate\Contracts\Mail\Mailer;useIlluminate\Queue\SerializesModels;useIlluminate\Queue\InteractsWithQueue;useIlluminate\Contracts\Bus\SelfHandling;useIlluminate\Contracts\Queue\ShouldQueue;classSendEmailextendsJobimplementsSelfHandling,ShouldQueue{useInteractsWithQueue,SerializesModels;protected$user;protected$email;publicfunction__construct(User$user,$email){$this->user=$user;$this->email=$email;}
添加回答
举报
0/150
提交
取消