fix: do not call debugbar if not available (when in prod)

This commit is contained in:
Valentin Lab
2025-09-29 11:32:19 +02:00
parent 1503f21b3b
commit 883d2d634d

View File

@@ -24,7 +24,9 @@ class InvoiceController extends Controller
public function pdf($uuid) public function pdf($uuid)
{ {
\Debugbar::disable(); if (app()->bound('debugbar')) {
app('debugbar')->disable();
}
return InvoicePDF::getByUUID($uuid); return InvoicePDF::getByUUID($uuid);
} }