亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

錯誤異常 : 未定義的變量: 天

錯誤異常 : 未定義的變量: 天

PHP
波斯汪 2022-09-12 10:05:06
用戶郵箱存儲庫我希望這些天應該在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;           }}
查看完整描述

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;


                }


查看完整回答
反對 回復 2022-09-12
  • 1 回答
  • 0 關注
  • 92 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號