Skip to content
Advertisement

Laravel download pdf returning random characters

Im trying to download my earlier saved pdf.

Ive created this function.

JavaScript

And it returns this:

JavaScript

Var dumping my $filepath is resulting in this : C:laragonwwwYTBNstorage/pdf/billing/invoice/YTBN_Armando_3_2019-0305.pdf" Which is correct.

Advertisement

Answer

try to used like that

JavaScript

or u can used directly in laravel 5.5 file path only no need to set header

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement