Home » Php » php – How to embed a view in another view with laravel?

php – How to embed a view in another view with laravel?

Posted by: admin February 25, 2020 Leave a comment

Questions:

I’m generating a PDF with mPDF (download all files and put in public folder) on Laravel. I want to embed this PDF that was created on a view called “showPDF”. But everytime that I try to put the PDF on a div with two buttons in the footer, the PDF ocuppate all page covering the buttons.

the code on confirm PDF is like this:

confirmPDF.blade.php

<html>     
.
.
.
<div class="container">
    @include('showPDF') //it's the file with the code that genarete the PDF
</div>
<div class="foot-buttons">
...
</div>
</body>

</html>

Someone knows how to embed the PDF generated?

How to&Answers: