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

coolsam/laravel-report-generator

A Laravel package for generating reports from your app's data. Define fields and queries, then render and export reports to PDF, Excel, or CSV. Integrates with Eloquent models and Blade views, making it easy to add downloadable, filterable reports to dashboards and admin panels.

View on GitHub
Deep Wiki
Context7

Rapidly Generate Simple Pdf & Excel Report on Laravel 5 (Using Barryvdh/DomPdf or Barryvdh/laravel-snappy & maatwebsite/excel)

Frequently asked questions about Laravel Report Generator
How do I install coolsam/laravel-report-generator in a Laravel app?
Install the package with Composer using composer require coolsam/laravel-report-generator. In Laravel 5 apps that do not use package auto-discovery, register the package service provider and any facade in config/app.php as documented in the README. Publish any package configuration if the README requires it before defining your first report.
Which Laravel versions does coolsam/laravel-report-generator support?
The package description targets Laravel 5 and integrates with Barryvdh DomPDF or Barryvdh laravel-snappy for PDFs and maatwebsite/excel for spreadsheets. If you are on Laravel 6 or newer, check the repository and Composer dependency constraints before adopting it. Test report rendering and exports in your Laravel version rather than assuming compatibility.
Does this package export reports to PDF, Excel, and CSV?
Yes, the package is designed to render reports and export them to PDF, Excel, or CSV. PDF generation uses Barryvdh DomPDF or Barryvdh laravel-snappy, while Excel export relies on maatwebsite/excel. CSV output is useful for lightweight downloads and data handoff from admin panels.
Should I use DomPDF or Snappy for PDF reports?
DomPDF is a PHP-based renderer that is simpler to set up for basic HTML and Blade report layouts. Snappy wraps wkhtmltopdf and can handle more complex CSS, but it requires the wkhtmltopdf binary on your server. Choose based on your report styling needs and production server capabilities.
How do I define report fields and queries with this Laravel report generator?
Reports are built by defining the fields you want to display and the query or data source behind them, then rendering the report through the package and a Blade view. Keep field labels and query logic close together so filters and exports stay consistent. Check the README for the exact report class and method names used by this package.
Can I use Eloquent models and relationships in generated reports?
Yes, the package is intended to integrate with Eloquent models and app data. You can use Eloquent queries or query builder results as the report data source and shape fields from model attributes or relationships. For complex reports, prepare the query carefully before passing results into the report and Blade view.
How do I customize report output with Blade views?
The package integrates with Blade views so you can control report layout, table structure, and formatting. Pass the report data into the view and use standard Blade loops and conditionals for rows and totals. This makes it easier to reuse familiar Laravel view patterns for PDF and HTML output.
Can I add filters to reports in a Laravel dashboard or admin panel?
Yes, you can add filters by applying where clauses or query scopes based on request input before generating the report. The package is aimed at making downloadable, filterable reports easy to add to dashboards and admin panels. Validate filter input and keep query logic centralized so PDF, Excel, and CSV exports use the same dataset.
How should I test report generation and handle production concerns?
Test report generation with sample data and assert that PDF, Excel, and CSV exports return expected responses or file contents. In production, confirm that DomPDF or wkhtmltopdf dependencies are installed and that storage and temp directories are writable. Also review report filters and exported fields so sensitive data is not exposed.
What are alternatives to coolsam/laravel-report-generator, and is it maintained?
Alternatives include using maatwebsite/excel directly for spreadsheets, Barryvdh DomPDF or laravel-snappy directly for PDFs, or building custom report classes. Because this package targets Laravel 5, check GitHub and Packagist for recent commits and compatible dependency constraints before using it in new projects. For modern Laravel versions, compare maintenance activity and Laravel support before choosing it.
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