From 0af62593cee64089a0b6e1fecda3831fb3891dce Mon Sep 17 00:00:00 2001 From: Tonko Mulder Date: Wed, 6 Jul 2022 13:18:51 +0200 Subject: [PATCH 1/2] Update composer.json barryvdh/laravel-dompdf version bump --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2066fef..379c9ef 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "keywords": ["Laravel", "Invoice", "Invoices", "PDF"], "require": { "php": "^7.3|^8.0", - "barryvdh/laravel-dompdf": "^1", + "barryvdh/laravel-dompdf": "^v2.0", "illuminate/http": "^5.5|^6|^7|^8|^9", "illuminate/support": "^5.5|^6|^7|^8|^9" }, From c8743a5f67ef91f719872a806f0c4c3b5dc081d9 Mon Sep 17 00:00:00 2001 From: Tonko Mulder Date: Wed, 6 Jul 2022 17:31:07 +0200 Subject: [PATCH 2/2] update laravel-dompdf facade The facade that the laravel-dompdf package uses was changed, apply the change here. https://github.com/barryvdh/laravel-dompdf/pull/899 --- src/Invoice.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Invoice.php b/src/Invoice.php index 4e4dcb1..e747e13 100644 --- a/src/Invoice.php +++ b/src/Invoice.php @@ -2,7 +2,7 @@ namespace LaravelDaily\Invoices; -use Barryvdh\DomPDF\Facade as PDF; +use Barryvdh\DomPDF\Facade\Pdf; use Carbon\Carbon; use Exception; use Illuminate\Http\Response; @@ -131,7 +131,7 @@ class Invoice public $table_columns; /** - * @var PDF + * @var Pdf */ public $pdf; @@ -257,7 +257,7 @@ public function render() $view = View::make($template, ['invoice' => $this]); $html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8'); - $this->pdf = PDF::setOptions(['enable_php' => true])->loadHtml($html); + $this->pdf = Pdf::setOptions(['enable_php' => true])->loadHtml($html); $this->output = $this->pdf->output(); return $this;