Exemplo n.º 1
0
 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");
 }
Exemplo n.º 2
0
 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");
 }