From 883d2d634d3a0a418f4f15160152dae412b640a9 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Mon, 29 Sep 2025 11:32:19 +0200 Subject: [PATCH] fix: do not call debugbar if not available (when in prod) --- app/Http/Controllers/Shop/InvoiceController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Shop/InvoiceController.php b/app/Http/Controllers/Shop/InvoiceController.php index a5d9e380..1250b97e 100644 --- a/app/Http/Controllers/Shop/InvoiceController.php +++ b/app/Http/Controllers/Shop/InvoiceController.php @@ -24,7 +24,9 @@ class InvoiceController extends Controller public function pdf($uuid) { - \Debugbar::disable(); + if (app()->bound('debugbar')) { + app('debugbar')->disable(); + } return InvoicePDF::getByUUID($uuid); }