PDF File to base64 #140
Unanswered
almukhalafi
asked this question in
Q&A
Replies: 1 comment
-
you can remove the PDF type hint to fix the problem, like so: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone!
I hope you're all doing well. I'm currently working on a Laravel project and could really use some assistance from the community.
I'm encountering an issue with one of my jobs, SendWhatsAppInvoice, which is causing an error related to the type of PDF being passed. Here's the error message I'm facing:
App\Jobs\SendWhatsAppInvoice::__construct(): Argument #2 ($pdf) must be of type Spatie\LaravelPdf\Facades\Pdf, Spatie\LaravelPdf\PdfBuilder given
I've already attempted to resolve this by adjusting the type hinting in the constructor of the SendWhatsAppInvoice class, but I'm still running into issues.
Here's the relevant code snippet from the job:
I believe the issue might be with how I'm dispatching the job or how I'm using the PDF facade. I'm hoping someone in the community might have encountered a similar issue before and can offer some guidance or suggestions for troubleshooting.
Any help or advice would be greatly appreciated! Thank you in advance for your assistance.
Best regards,
Beta Was this translation helpful? Give feedback.
All reactions