Answers for "add attachment to the invoice laravel"

PHP
0

add attachment to the invoice laravel

$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");
});
Posted by: Guest on February-01-2022

Code answers related to "add attachment to the invoice laravel"

Browse Popular Code Answers by Language