Laravel Mail::send how to pass data to mail View

后端 未结 4 906
迷失自我
迷失自我 2020-12-31 21:15

How can i pass data from my Controller to my customized mail View ?

Here\'s my controller\'s send mail method :

4条回答
  •  再見小時候
    2020-12-31 21:57

    The callback argument can be used to further configure the mail. Checkout the following example:

    Mail::send('emails.dept_manager_strategic-objectives', ['email' => $email], function ($m) use ($user) {
            $m->from('info@primapluse.com', 'BusinessPluse');
            $m->to($user, 'admin')->subject('Your Reminder!');
    });
    

提交回复
热议问题