I am trying to generate a pdf and when I run the function the blank screen appears. I'm using domPdf for this
This is the code that I have in my controller:
public function pdf_facturas($id){
$data = ['esto es una prueba'];
$pdf = PDF::loadview('facturas.pdf_facturas', $data);
$pdf->download('pdf_facturas.pdf');
// view('facturas.pdf_facturas');
}
On my route I have this:
Route::get('pdf_facturas/{id}', 'FacturaController@pdf_facturas')->name('pdf_facturas');