I’m using DomPDF to generate pdf on my laravel app, and it works fine on the localhost, but when i upload it to my server it shows:
Class "BarryvdhDomPDFFacadePdf" not found
this is the function i’m using
use BarryvdhDomPDFFacadePdf;
...
public function indexPDF(Request $request)
{
$date = new Carbon($request->date);
$startdate = $date->startOfDay();
$enddate = $date->copy()->endOfDay();
$requisitions = Requisition::where('date_start','<',$enddate)
->where('date_end','>',$startdate)->orderBy('date_start','ASC')
->get();
--> $pdf = Pdf::loadView('pdf.requisitions',compact('date','requisitions'));
return $pdf->download('requisições_do_dia.pdf');
// return view('pdf.requisitions',compact('date','requisitions'));
}
does anyone know what the problem might be?
uploaded all the necessary files but still get the same error