1
我想先加载页面,然后激活$邮件发送电子邮件。因为当我点击转到下一页其采取时间,因为它发送电子邮件,然后它正在加载,所以,Laravel:加载一个页面,然后发送邮件
什么是最好的方式来做到这一点。或任何方式。因为我无法弄清楚。
这里片断
public function sInterest($project_id, AppMailer $mailer)
{
$project = Project::findOrFail($project_id);
if($project->investment){
$mailer->sendInterestNotificationI($user, $project);
$mailer->sendInterestNotificationD($project, $user);
$mailer->sendInterestNotificationA($project, $user);
return view('projects.offer', compact('project'));
}
}
是有办法$邮件返回页面后激活?
最好的方法是将邮件发送到队列并处理队列。 –