open() 参数 #1 ($filename) 不能包含任何空字节
作者: MyNameIsDVL创建于 2024年1月29日更新于 2026年2月4日
标签stale
This is my service: use Barryvdh\DomPDF\Facade\Pdf; class PdfService { public function __construct() { } public static function voucher(Voucher $voucher) { $data = [ 'total_amount' => $voucher->amount, 'code' => $voucher->code ]; return Pdf::loadView('pdf.voucher', $data)->stream('voucher_'.$voucher->code.'.pdf'); } } My markdown mail: /** * Build the message. * * @return $this */ public function build() { $attachments = array(); foreach ($this->vouchers as $voucher) { array_push($attachments, PdfService::voucher($voucher)); } return $this->markdown('mail.voucher', ['vouchers'=>$this->vouchers])->subject('Oto Twój voucher')->attachMany($attachments); } What am I doing wrong? Thanks
内容来源: barryvdh/laravel-dompdf