how to dompdf genarate pdf and strore public directory code example
Example: how to save information on pdf file in laravel project
$pdf = PDF::loadView('pdf.invoice', $data);
Storage::put('public/pdf/invoice.pdf', $pdf->output());
return $pdf->download('invoice.pdf');