I have a Laravel
application that generates reports in PDF
according to parameters received from a form via POST and would like to view the files generated with viewer.js
without having to save the files in directory and the function used to generate the reports in PDF
is:
public function generateReport(Request $request){
$dataset = Report::where('idfilial', '=', $request->idfilial)
->whereBetween('datamovimento', [$request->datainicial, $data->datafinal])
->get();
$pdf = \App::make('dompdf.wrapper');
$pdf->loadHtml(view('report.pdf', compact('dataset')));
return $pdf->stream();
}