I create a pdf with the package barryvdh / laravel-dompdf as follows:
public function generarPdf(Request $req) {
$datos = $req->data;
Debugbar::info($datos);
$archivo = storage_path().'\pdf\equipos\'.$datos[1].'-'.$datos[2].'.pdf';
$pdf = \PDF::loadView('equipos.pdf_vista', $datos);
$pdf->setPaper('a4');
$pdf->setWarnings(false);
$pdf->save($archivo);
return $pdf->loadFile($archivo);
}
This is created correctly, my problem is when I try to access the file to show it to the user, it appears to me that the access is denied, example:
Permission denied on C: \ virtualhost \ System \ storage \ pdf \ computers \ 00001-Ulma1.pdf.