public function reportmax(PdfLibrary $library) { $library->load(); $this->dompdf = new \DOMPDF(); $products = Product::filterAndPaginateM(); $title = trans('products.report_min'); $route = route('reports'); return $html = view('products.report', compact('products', 'title', 'route')); $this->dompdf->load_html($html); $this->dompdf->get_css(); $this->dompdf->render(); return $this->dompdf->stream("products_max.pdf"); }