1 回答

TA貢獻1856條經驗 獲得超17個贊
public function create()
{
$users = User::where('user_type', 2)->get();
$auto_email_templates=AutoEmailTemplate::all();
foreach ($users as $user) {
foreach($auto_email_templates as $mail){
if( $user->created_at > Carbon::now()->addDays($mail->days)){
if ($user->created_at < Carbon::now()) //signup
{
return false;
}
Mail::to($user)->send(new Automail($template));
return true;
}
- 1 回答
- 0 關注
- 92 瀏覽
添加回答
舉報