public function download($filename = 'document.pdf') { return new Response($this->output(), 200, array('Content-Type' => 'application/pdf', 'Content-Disposition' => 'attachment; filename="' . $filename . '"')); }
/** * Make the PDF downloadable by the user * * @param string $filename * @return \Barryvdh\Snappy\Response * @static */ public static function download($filename = 'document.pdf') { return \Barryvdh\Snappy\PdfWrapper::download($filename); }