How do i Generate a certificate with a users name on it using php/laravel.
I have a customer base, and when they make a purchase, i want to generate a Certificate for them, i have the certificate created in photoshop right now. I want to use php to edit the users name in the name field and the date etc onto the certificate and then email it to the user.
I want to know how i would go around doing such a task?
I hopeYou have to create certificate as a PDF
install this in your project - https://github.com/barryvdh/laravel-dompdf
in your controller do like this this sample of creating invoice ok
public function invoice($id){
$job = Job::find($id);
$pdf = \PDF::loadView('jobs.invoice',compact('job'));
return $pdf->download('invoice.pdf');
in my index i have all the jobs in a table when i click invoice button i can generate my invoice same like you also can do yours
this is how i call invoice method
I tried what they said with the tags to get it rendered but its still not working.
I don't know what else to do.
Right now the Certificate is a PSD file, i can export it as SVG and then edit the text within the code of the SVG because its plain text, but i cant render the SVG file for some reason.
@ctaljaardt listen as your mention if you have a file test.blade.php insight cert folder useroute like this then in your url yourprojectname/certificate you will get blank PDF file then if you want paas the data you follow method what i have mention before
careful cert.test means cert folder test.blade.php file and when you create Controller remember use camel case its good