用户邮箱存储库
我希望这些天应该在addDays()中添加日期,我将得到我的数据库
public function create()
{
$users = User::where('user_type', 2)->get();
$auto_email_templates=AutoEmailTemplate::all()->pluck('days');
foreach ($users as $user) {
if( $user->created_at > Carbon::now()->addDays($days)){
if ($user->created_at < Carbon::now()) //signup
{
return false;
}
Mail::to($user)->send(new Automail($template));
return true;
}
}
慕慕森