Ritu Singh
To display an image from your MySQL database in a PDF using DomPDF in Laravel, you can follow these steps:
Make sure you have the required packages installed:
DomPDF: composer require barryvdh/laravel-dompdf Laravel Collective HTML package: composer require larave lcollective/html Ensure your database table contains a column to store the image data. You can use the BLOB (Binary Large Object) data type to store images.
In your Laravel Blade view (e.g., certificate.blade.php), you can use the Laravel Collective HTML package's image method to display the image.
Here's the updated code for your CertificateController:
Answered by:> nileshkardate
Credit:> Stack Overflow
Read more:
>Step by Step guide to Deploy Terraform in Azure using GitHub Actions
>How to do PHP Decryption from Node.js Encryption
>How to create a line animation in Python?
>Build an Electron application from scratch
>How you can create array with associative array in other array php?