Download the PHP package jimmyjs/pdf-report-generators without Composer
On this page you can find all versions of the php package jimmyjs/pdf-report-generators. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jimmyjs/pdf-report-generators
More information about jimmyjs/pdf-report-generators
Files in jimmyjs/pdf-report-generators
Package pdf-report-generators
Short Description Rapidly Generate Simple Pdf Report on Laravel 5 (Using Barryvdh/DomPdf or Barryvdh/laravel-snappy)
License MIT
Informations about the package pdf-report-generators
This package is deprecated!
Please go to https://github.com/Jimmy-JS/laravel-report-generator instead!
Laravel - Pdf Report Generators
Rapidly Generate Simple Pdf Report on Laravel (Using barryvdh/laravel-dompdf)
This package provides a simple pdf generators to speed up your workflow
Installation
Add package to your composer:
composer require jimmyjs/pdf-report-generators
Then, add the ServiceProvider to the providers array in config/app.php
Jimmyjs\PdfReportGenerators\ServiceProvider::class,
Usage
This package is make use of chunk
method (Eloquent / Query Builder) so it can handle big data without memory exhausted.
Also, You can use PdfReportGenerator
facade for shorter code that already registered as an alias for Jimmyjs\PdfReportGenerators\Facade
class.
Example Code
Note
Will produce a same result with:
So you can do some eager loading like:
Output Report
Example Code With Group By
Or, you can total all records by group using groupBy
method
PLEASE TAKE NOTE TO SORT GROUPBY COLUMN VIA QUERY FIRST TO USE THIS GROUP BY METHOD.
Output Report With Group By
Other Method
1. setPaper($paper = 'a4')
Description: Set Paper Size
Params:
- $paper (Default: 'a4')
Usage:
2. setCss(Array $styles)
Description: Set a new custom styles with given selector and style to apply
Params:
- Array $styles (Key: $selector, Value: $style)
Usage:
3. setOrientation($orientation = 'portrait')
Description: Set Orientation to Landscape or Portrait
Params:
- $orientation (Default: 'portrait')
Usage: