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 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

Technical Evaluation

Architecture fit. The package is a thin, fluent builder layer that fans out to three mature renderers: barryvdh/laravel-dompdf (pure-PHP HTML→PDF), barryvdh/laravel-snappy (wkhtmltopdf binary), and maatwebsite/excel (PhpSpreadsheet). It registers a service provider, a ReportGenerator facade, and a config file, then exposes ReportGenerator::pdf()/::excel() builders with setView, setData, setCss, setPaper, setOrientation, setHeaderView, setFooterView, setMetaData, and download/stream/generate terminals. There is no persistence, no queueing, no authorization, and no scheduling — it is strictly a rendering convenience. That makes it a clean fit for the "export" cross-cutting concern in a Laravel app: it composes with existing policies, controllers, and storage rather than imposing its own lifecycle. The important architectural observation for a TPM is that the package contributes very little intrinsic value — the real rendering work is done by its dependencies, which we may consume directly with equal ease.

Integration feasibility. Installation is standard: composer require jimmyjs/laravel-report-generator, auto-discovery on Laravel 5.5+, optional config publish. It presumes the underlying engines are installed and configured separately, and it deliberately supplies no report templates — every PDF view, CSS file, and Excel column map is ours to write. Effort is therefore dominated by template and data-shaping work, not by the package itself. The Excel path is the smoother of the two; the PDF path inherits whatever limitations the chosen engine has (DomPDF's partial CSS support, no flexbox/grid; wkhtmltopdf's unmaintained Qt WebKit).

Technical risk. This is where the package scores poorly despite a 577-star rating:

  • Maintenance staleness. Last release April 2022, README framed around Laravel 5, zero dependents on record. There is no evidence of an active maintainer or a CI matrix against current Laravel/PHP.
  • Dependency drift. It pins ranges against maatwebsite/excel and the Barryvdh PDF packages, all of which have moved (Excel 3.1.x minors, DomPDF 2.x, PHP 8.2/8.3 typing and deprecations). A composer update in a modern app is likely to surface signature or config incompatibilities that we, not upstream, will fix.
  • System dependency fragility. The Snappy path requires a wkhtmltopdf binary that is effectively end-of-life and awkward to provision reproducibly across containers and Apple Silicon dev machines.
  • Runtime profile. Generation is synchronous and memory-hungry; DomPDF in particular can consume multiples of the HTML size in RAM, and wide tables with repeated headers are a known pain point.
  • No first-class async. There is no queue integration, chunked generation contract, or object-storage handoff — all of that is our responsibility.

Mitigating factor: the surface area we would actually depend on is small and readable. Forking or vendoring is cheap, and the fluent API is trivial to reproduce behind our own interface.

Key questions.

  1. Which Laravel and PHP versions are in scope, and is there a supported upgrade path for the next 18 months?
  2. What are the real concurrency and volume numbers — reports per day, rows per report, peak simultaneous exports?
  3. What PDF fidelity is required: brand-accurate layouts, page headers/footers with page numbers, CJK/RTL fonts?
  4. Are reports delivered synchronously to a browser, or must they be emailed/archived to S3 asynchronously?
  5. Do Excel outputs need formulas, charts, freeze panes, or multi-sheet structure beyond what the builder exposes?
  6. Do exports contain PII, and what retention/access-control obligations follow?
  7. Are we willing to own a fork, or should this serve only as a reference implementation?

Integration Approach

Stack fit. If the target application is Laravel 5.5–7, this is close to drop-in. On Laravel 9/10/11 expect to patch the service provider bindings and dependency constraints; treat "install and go" as a hypothesis to validate in a spike, not an assumption. Whichever engine we pick should be dictated by portability: DomPDF for zero-binary deployments, Snappy only if we already operate wkhtmltopdf, and Browsershot/headless Chrome as the forward-looking replacement if layout fidelity matters.

Migration path. Recommended posture: do not take a hard runtime dependency. Either (a) fork the package into app/Support/Reporting or a private VCS repo, or (b) reimplement the ~200 lines of fluent glue against the underlying libraries directly. Both keep the ergonomics the team likes while removing the abandoned-upstream risk. Wrap either in our own ReportBuilder interface so engines can be swapped (DomPDF → Browsershot, Excel 3.x → later) without touching dozens of call sites.

Compatibility. Pin exact versions of maatwebsite/excel, dompdf/dompdf, and the Barryvdh wrappers in composer.json; add a CI job that resolves and runs the export smoke tests against the PHP/Laravel versions we support. Skip Snappy unless a hard requirement forces it. Verify font availability in the container image early — missing fonts are the most common "works locally, broken in prod" PDF defect.

Sequencing.

  1. Spike (1 week): one representative report each for PDF and Excel, end-to-end, with row count and memory measured against production-scale data.
  2. Abstraction: introduce the ReportBuilder interface and internal wrapper; migrate the spike behind it.
  3. Pilot (2–3 reports): establish shared header/footer partials, a base CSS for print, and standardized file naming.
  4. Async pipeline: queue-driven generation, write to object storage, return signed URLs; add progress/notification UX.
  5. Broaden and retire: migrate remaining reports, then forbid direct facade usage via code review or static analysis.

Operational Impact

Maintenance. Because we fork, we own it — but the burden is modest, on the order of a few days per quarter plus reactive fixes when underlying libraries release majors. Budget for one named owner. Track maatwebsite/excel, dompdf/dompdf, and the Barryvdh wrappers in a dependency-watch process; these, not this package, are the real upgrade events.

Support. Community support is effectively nil: low issue velocity, no vendor, no commercial backing. Internal documentation must be written by us — the README is a usage sketch, not a guide. The upside is that the code is short enough for any mid-level Laravel developer to read and modify confidently, so we are not hostage to upstream responsiveness.

Scaling. Synchronous generation is the primary constraint. Move every export above a modest threshold (roughly: anything that can exceed a few thousand rows or a few seconds) onto a queue with dedicated workers so exports cannot starve web traffic. Generate to temporary storage and stream from there rather than buffering in memory. For large Excel exports, prefer maatwebsite/excel's FromQuery/WithChunkReading/ShouldQueue contracts over anything the wrapper offers — the builder's own API does not meaningfully address volume. Cap concurrent generation per user and enforce a timeout ceiling.

Failure modes. Expect: missing or mismatched wkhtmltopdf binary; font substitution producing garbled or tofu-glyph PDFs; memory exhaustion and 500s on wide or long tables; PHP execution timeouts during large exports; Excel date/null/number formatting drift; full disk on the temp volume; silent truncation when a report exceeds a page or sheet limit; and breakage after an unrelated composer update resolves incompatible transitive versions. Each deserves a smoke test in CI and an alert.

Ramp-up. Low. The fluent API is learnable in under a day, and developers familiar with Laravel views will be productive immediately. The genuine skill investment is elsewhere: print-oriented CSS for PDF engines and the PhpSpreadsheet styling/formatting model for Excel. Plan a short internal brown-bag on those two topics rather than on the package itself.

Bottom line. Valuable as a pattern and a starting point; not advisable as a long-lived direct dependency. Adopt the fluent-builder ergonomics, fork or reimplement, pin the engines deliberately, and move all nontrivial generation off the request path.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib