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" }, 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;