-1
Hey, I need some help! My current project needs to generate a report from one table, great I did with Dompdf, my doubt is how I make the pdf open in another tab and not in the current tab. The version of the Laravel is 5.5. Thank you very much. :)
public function pdfexport($id)
{
//export PDF from students table
$student = Student::find($id);
$pdf = PDF::loadView('student.pdf', ['student'=> $student])->setPaper('a4', 'portrait');
$fileName = $student->name.date("dmy");
return $pdf->stream($fileName.'.pdf');
}
Thank you, it was so simple and I had forgotten kkk
– Beatriz Carlos