$pdf = PDF::loadView('pdf_view', $data)->setPaper('a4', 'portrait');
Non static method 'loadView' should not be called statically.intelephense(1036)
$pdf = PDF::loadView('pdf_view', $data)->setPaper('a4', 'portrait');
Non static method 'loadView' should not be called statically.intelephense(1036)
You probably imported the wrong class or you didn't register the facade itself!
If you added the facade in config/app.php you need to do this at the top of your controller
use PDF;
If you want to point to the specific facade class you need to do this
use Barryvdh\DomPDF\Facade as PDF;
PS: Please share your full code and package name for better understanding.