I need to get the html of a Mailable class
$mail->html = (new InactivityReminder())->"do something to output the html"
There seems to be no toHtml method or something similar.
Mailable:
class InactivityReminder extends Mailable
{
use Queueable, SerializesModels;
public function __construct()
{
}
public function build()
{
return $this->markdown('mail.it.inactivityReminder');
}
}
In 5.5 the render()
method will render the view that you return in Mailable
:
$html = (new InactivityReminder)->render()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With