main
附件发送邮件时,未定义的变量:pdf_show
。
$pdf_show
答案 0 :(得分:2)
尝试将use($pdf_show)
添加到您的邮件功能
$pdf = View::make('site.bill', compact('invoice_bill'))->render();
$pdf_show = PDF::load($pdf, 'A4', 'portrait')->output();
$msg = Config::get('ashram.delivered');
Mail::send('blank', array('msg' => Config::get('ashram.delivered'),'id'=>$id,'is_approve'=>$is_approve), function($message) use ($pdf_show) {
$message->to(Request::segment(3), Input::get('name'))->cc('subhankarbhattacharjee56@yahoo.in')->subject('Delivery')
->attachData($pdf_show , "Tax Invoice");
});