我需要获取 Mailable 类的 html
$mail->html = (new InactivityReminder())->"do something to output the html"
Run Code Online (Sandbox Code Playgroud)
似乎没有 toHtml 方法或类似的东西。
可邮寄:
class InactivityReminder extends Mailable
{
use Queueable, SerializesModels;
public function __construct()
{
}
public function build()
{
return $this->markdown('mail.it.inactivityReminder');
}
}
Run Code Online (Sandbox Code Playgroud)
在 5.5 中,该render()方法将渲染您返回的视图Mailable:
$html = (new InactivityReminder)->render()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2300 次 |
| 最近记录: |