how to generate the pdf when the form is submitting in laravel 5.2
<p>I am working on a  product management system and there is a module called purchase. </p>

<p>I have wrote the <code>store()</code> method the controller and the model part too.</p>

<p>Now I want to generate the invoice when I click on submit button. I used PDF generator plugin as <code>barryvdh/laravel-dompdf</code>. I'm new to PHP &amp; Laravel and just wants to know instructions to do the PDF generation process.</p>