lucasvscn/laravel-pdf-report is a Laravel package for blade components to build pdf reports..
It currently has 0 GitHub stars and 168 downloads on Packagist (latest version 1.0.0).
Install it with composer require lucasvscn/laravel-pdf-report.
Discover more Laravel packages by lucasvscn
or browse all Laravel packages to compare alternatives.
Last updated
Blade components to build PDF reports using DOMPdf.
Download the package with Composer.
composer require lucasvscn/laravel-pdf-report
Then install command will copy the assets into your application's folder.
php artisan laravel-pdf-report:install
Compile your assets (optional).
npm run dev
Now you can use this blade components to build your layout.
<!-- PATH: resources/views/pdf/report.blade.php -->
<x-pdf-report>
<x-slot name="header">
<h1>Report header</h1>
</x-slot>
<x-slot name="footer">
Page <span class="page_number"></span>
</x-slot>
<x-pdf-page>
Content for the 1st page.
</x-pdf-page>
<x-pdf-page>
Content for the nth page...
</x-pdf-page>
</x-pdf-report>
Generate the PDF using barryvdh/laravel-dompdf package.
use Barryvdh\DomPDF\Facade\Pdf;
$pdf = Pdf::loadView('pdf.report');
return $pdf->stream();
composer test
The MIT License (MIT). Please see License File for more information.