I have this code to get some HTML stored in the column "content" of the "badges" table in a pdf:
$pdf = app()->make('dompdf.wrapper');
$pdf->loadHTML($badgeContent->badge->content);
Do you know if is possible to send this pdf in a attachment using Laravel Mail?
You could sent almost any file in attachment
in laravel, create a new mailable inside build paste this code
public function build()
{
return $this->view('emails.orders.shipped')
->attach('/path/to/file');
}
If you need more information on this check laravel's documentation (this code is copied from the laravel's documentation https://laravel.com/docs/5.6/mail#writing-mailables
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