public function reportmin(PdfLibrary $library) { $library->load(); $this->dompdf = new \DOMPDF(); $products = Product::filterAndPaginateMin(); $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_min.pdf"); }
public function reportSupplier(PdfLibrary $library) { $library->load(); $this->dompdf = new \DOMPDF(); $partners = Partner::reportSupplier(); $title = trans('general.supplier_report'); $route = route('reports'); return $html = view('partners.report', compact('partners', 'title', 'route')); $this->dompdf->load_html($html); $this->dompdf->get_css(); $this->dompdf->render(); $this->dompdf->stream("partners_supplier.pdf"); }