Add Attachment To The Invoice Laravel

[Solved] Add Attachment To The Invoice Laravel | Php Frameworks Laravel - Code Explorer | yomemimo.com
Question : add attachment to the invoice laravel

Answered by : lokesh-ramchandani-in6l3jq294i2

$data = array( 'name' => Input::get('name'), 'detail'=>Input::get('detail'), 'sender' => Input::get('sender') );
$pdf = PDF::loadView('letters.test', $data);
Mail::send('emails.invoice', $data, function($message) use($pdf)
{ $message->from('[email protected]', 'Your Name'); $message->to('[email protected]')->subject('Invoice'); $message->attachData($pdf->output(), "invoice.pdf");
});

Source : | Last Update : Tue, 08 Feb 22

Answers related to add attachment to the invoice laravel

Code Explorer Popular Question For Php Frameworks Laravel