how to save information on pdf file in laravel project
snippet in php

how to save information on pdf file in laravel project

user2436

$pdf = PDF::loadView('pdf.invoice', $data);

Storage::put('public/pdf/invoice.pdf', $pdf->output());

return $pdf->download('invoice.pdf');