File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1616 "php" : " ^7.3|^8.0" ,
1717 "barryvdh/laravel-dompdf" : " ^v2.0" ,
1818 "illuminate/http" : " ^5.5|^6|^7|^8|^9" ,
19- "illuminate/support" : " ^5.5|^6|^7|^8|^9"
19+ "illuminate/support" : " ^5.5|^6|^7|^8|^9" ,
20+ "symfony/http-foundation" : " ^4.0|^5.0|^6.0"
2021 },
2122 "require-dev" : {
2223 "phpunit/phpunit" : " ^9.3" ,
Original file line number Diff line number Diff line change 66use Illuminate \Support \Str ;
77use LaravelDaily \Invoices \Contracts \PartyContract ;
88use LaravelDaily \Invoices \Services \PricingService ;
9+ use Symfony \Component \HttpFoundation \File \File ;
910
1011/**
1112 * Trait InvoiceHelpers.
@@ -202,10 +203,9 @@ public function getTotalAmountInWords()
202203
203204 public function getLogo ()
204205 {
205- $ type = pathinfo ($ this ->logo , PATHINFO_EXTENSION );
206- $ data = file_get_contents ($ this ->logo );
206+ $ file = new File ($ this ->logo );
207207
208- return 'data:image/ ' . $ type . ';base64, ' . base64_encode ($ data );
208+ return 'data: ' . $ file -> getMimeType () . ';base64, ' . base64_encode ($ file -> getContent () );
209209 }
210210
211211 /**
You can’t perform that action at this time.
0 commit comments