是否可以将foo
变量传递给MailMessage
:
return (new MailMessage)
->subject('Hello : ' . __('Verify Email Address'))
->line(__('Please click the button below to verify your email address.'))
->action(__('Verify Email Address'), $verificationUrl)
->line(__('If you did not create an account, no further action is required.'));
,以便在resources/views/vendor/notifications/email.blade.php
模板文件的任何地方使用它:
{{ foo }}
yes you can:
,
Mail::to($email)
->send(new NotifiyNewOrder($datayouwanttopass));
和:
public $datayouwanttopass;
public function __construct($datayouwanttopass)
{
$this->datayouwanttopass = $datayouwanttopass;
}
public function build()
{
return $this->
from('set the sender email')
->subject('subject')
->view('the view here.');
}