Update Req LOG Template
This commit is contained in:
@@ -292,18 +292,26 @@ class RequestLogController extends Controller
|
||||
$options = new Options();
|
||||
$options->set('isHtml5ParserEnabled', true);
|
||||
$options->set('isPhpEnabled', true);
|
||||
$options->set(['isRemoteEnabled' => true]);
|
||||
$pdf->setOptions($options);
|
||||
|
||||
$html = view('pdf.view', $data);
|
||||
$pdf->loadHtml($html);
|
||||
// Halaman 1
|
||||
$html1 = view('pdf.req_log_page_1', $data);
|
||||
|
||||
// Halaman 2
|
||||
$html2 = view('pdf.req_log_page_2', $data);
|
||||
|
||||
// Gabung konten HTML dari dua tampilan
|
||||
$htmlCombined = $html1 . $html2;
|
||||
|
||||
$pdf->loadHtml($htmlCombined);
|
||||
$pdf->render();
|
||||
|
||||
$headers = [
|
||||
'Content-Type' => 'application/pdf',
|
||||
'Content-Disposition' => 'inline; filename="file.pdf"',
|
||||
];
|
||||
|
||||
|
||||
return response($pdf->output(), 200, $headers);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user