Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Report Generator

Laravel Report Generator Laravel Package

jimmyjs/laravel-report-generator

Quickly generate PDF, Excel, and CSV reports in Laravel from any query builder or Eloquent query. Define columns, grouping, and aggregates in PHP, render with Blade views, and export or stream polished reports through a simple, fluent API.

View on GitHub
Deep Wiki
Context7

Rapidly Generate Simple Pdf, CSV, & Excel Report Package on Laravel

Frequently asked questions about Laravel Report Generator
How do I install jimmyjs/laravel-report-generator?
Install it with composer require jimmyjs/laravel-report-generator. On Laravel 5.5 and later the service provider and ReportGenerator facade are auto-discovered, and you can optionally publish the config file. The package does not bundle a rendering engine, so you must also install and configure barryvdh/laravel-dompdf, barryvdh/laravel-snappy, and/or maatwebsite/excel depending on which output formats you need.
Does laravel-report-generator work with Laravel 10 or Laravel 11?
There is no verified support: the last release was April 2022 and the documentation is framed around Laravel 5. Auto-discovery still applies on 5.5+, but the package pins dependency ranges against older versions of maatwebsite/excel and the Barryvdh PDF packages. On Laravel 9, 10, or 11 expect to patch service provider bindings and composer constraints yourself, and validate the whole path in a spike rather than assuming install-and-go.
How do I generate a PDF report from an Eloquent query?
Start with ReportGenerator::pdf() and pass your query builder or Eloquent query, then define the columns in PHP. Point setView at a Blade view that renders the table markup, pass any supporting values with setData, and finish with download, stream, or generate. The package itself only orchestrates data, view, and the underlying PDF engine, so all layout work lives in your Blade template.
Can I define grouping and aggregate totals in a report?
Yes. The fluent builder lets you declare columns plus grouping and aggregate definitions in PHP, so sums and grouped sections are described declaratively instead of hand-written in the template. Keep in mind this is presentation-level aggregation over the result set you supply, so for large datasets it is usually better to aggregate in SQL and pass the summarized rows through.
How do I customize the PDF layout, CSS, headers, and footers?
The package ships no report templates at all, so you write every view yourself and attach it with setView. Use setCss for stylesheets, setPaper and setOrientation for page geometry, setHeaderView and setFooterView for repeated page elements, and setMetaData for document metadata. PDF fidelity is bounded by the engine: DomPDF supports only partial CSS and has no flexbox or grid, so design with simple table-based layouts.
Should I use DomPDF or the Snappy wkhtmltopdf driver?
DomPDF is pure PHP, so it needs no system binary and is far easier to provision in containers and CI, at the cost of limited CSS support. Snappy wraps wkhtmltopdf, which renders more complex layouts but requires an end-of-life binary that is awkward to install reproducibly, especially on Apple Silicon development machines. For most Laravel apps the DomPDF path is the pragmatic default.
Does the package support Excel formulas, charts, freeze panes, or multiple sheets?
The Excel path delegates to maatwebsite/excel but the builder only exposes a column map, so advanced workbook features are outside what it expresses. If you need formulas, charts, freeze panes, or multi-sheet structure, call maatwebsite/excel directly and use this package only for its PDF convenience. The Excel route is otherwise the smoother of the two output formats.
What is the difference between download, stream, and generate?
download returns a response that forces the browser to save the file, while stream sends it inline so it can be previewed in the browser. generate produces the file without returning a response, which is what you want when archiving to S3, attaching to an email, or moving the artifact around yourself. Pick the terminal that matches your delivery requirement, since the package has no storage or delivery layer of its own.
Are reports generated asynchronously, and how do I handle large exports?
Generation is synchronous and memory-hungry, with DomPDF in particular consuming multiples of the HTML size in RAM, and wide tables with repeated headers are a known pain point. There is no queue integration, chunked generation contract, or object-storage handoff, so dispatching a job, batching rows, and writing to disk are all your responsibility. For anything beyond small on-demand exports, wrap the call in a queued job and stream the result to storage.
Is jimmyjs/laravel-report-generator maintained and safe for production?
It is stale: the last release was April 2022, there are no recorded dependents, and there is no CI matrix against current Laravel or PHP versions. Its intrinsic value is low because the real rendering is done by barryvdh/laravel-dompdf, barryvdh/laravel-snappy, and maatwebsite/excel, which you can call directly with equal ease. The fluent surface is small and readable, so forking or vendoring it behind your own interface is cheap, and many teams treat it as a reference implementation rather than a long-term dependency.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core