Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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('us@example.com', 'Your Name');

    $message->to('foo@example.com')->subject('Invoice');

    $message->attachData($pdf->output(), "invoice.pdf");
});
 
PREVIOUS NEXT
Tagged: #add #attachment #invoice #laravel
ADD COMMENT
Topic
Name
6+8 =