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