I want to preview the dompdf in the browser. However, instead of previewing, livewire downloads the file.
$pdf = Pdf::loadView("template", compact('data'))->output();
return response()->streamDownload(
fn () => print($pdf),
"filename.pdf"
);
I also tried this.
return Pdf::loadView("template", compact('data'))->stream();