Did you register the Facade properly in the config/app.php?
'PDF' => Barryvdh\DomPDF\Facade::class,
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Totaly new to DOMPDF and am not getting very far very fast. The docs. are pretty poor. I have downloaded barry's DomPDF L5 wrapper. and I get this error:
Non-static method Barryvdh\DomPDF\PDF::loadView() should not be called statically, assuming $this from incompatible context
I have tried adding static to the function, but had no effect.
Function
public function get_pdf(){
$data = Quotation::where('reference','=','Sam100117-82');
$pdf = PDF::loadView('create_quote', $data);
return $pdf->download('quote.pdf');
}
so what is going on ?? Many thanks !
Please or to participate in this conversation.