$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");
});