yajra/laravel-datatables-export
Server-side export plugin for yajra/laravel-datatables using queues, Livewire, and OpenSpout. Adds an export-button component and queued batch jobs to generate spreadsheet exports from DataTable classes on Laravel 13 (PHP 8.3+).
Feature Development:
datatables:purge-export). Reduces storage costs for long-running applications.Roadmap Prioritization:
/exports/{id}/download) for third-party integrations or white-label solutions.Build vs. Buy:
Use Cases:
premium status")."This package lets us deliver bulk data exports at scale without sacrificing performance or user experience. For example, a customer support team could export 50K+ tickets in seconds—without freezing the UI—while our accounting team gets formatted CSV/Excel files for QuickBooks. It’s a 10x productivity boost for data-heavy workflows, with minimal dev effort. The async queueing also future-proofs our system for larger datasets, reducing server costs by offloading heavy tasks. Cost: ~$0 (MIT license); Time to implement: 2–4 dev days; ROI: Faster reporting, happier power users, and lower support overhead for manual exports."
Key Metrics to Track Post-Implementation:
*"This is a drop-in extension for Yajra’s Laravel DataTables that adds queued CSV/XLSX exports with Livewire integration. Here’s why it’s a no-brainer:
- Performance: Uses OpenSpout (memory-efficient) and Laravel queues to handle large datasets without blocking requests.
- Flexibility:
- Custom formats for dates (
mm/dd/yyyy), numbers ($#,##0.00), and text (e.g., leading zeros for IDs).- Auto-detects numeric/date fields or lets you override via
Column::make()->exportFormat().- Supports QueryBuilder (v12.2+) for complex SQL exports.
- UX: Livewire buttons enable exports in SPAs without page reloads. Auto-download option for seamless user flow.
- Maintenance: MIT-licensed, actively maintained (last release: June 2026), and integrates with our existing DataTables setup.
- Scalability: Configurable queue (supports Redis, database, etc.) and automatic file purging to manage storage.
Trade-offs:
- Requires Laravel queues (already in our stack).
- Limited to CSV/XLSX (no PDF/JSON out of the box).
- Needs
yajra/laravel-datatables-buttonsas a dependency.Migration Path:
- Install:
composer require yajra/laravel-datatables-export:"^13.0".- Add
use WithExportQueueto DataTable classes.- Include
<livewire:export-button />in views.- Run
php artisan queue:batches-tableandphp artisan migrate.- Start queue worker (
php artisan queue:work).Alternatives Considered:
- Laravel Excel: Lacks DataTables integration and queueing.
- Custom solution: Would take 2–3 weeks vs. 2–4 days with this package.
Recommendation: Proceed with POC for a high-priority export use case (e.g., admin panel reports). If successful, roll out to other modules."*
For Devs:
composer require + 1-hour config.use WithExportQueue to DataTable classes and <livewire:export-button /> to views.sheetName(), exportFormat(), or extend the ExportButton Livewire component.php artisan queue:work --once.How can I help you explore Laravel packages today?