developerawam/livewire-datatable
A powerful, flexible DataTable component for Laravel Livewire that turns your Eloquent models into interactive tables with zero configuration. Server-side rendering, search, sorting, filters, pagination, exports, and full customization.
Published: 2026-08-28 03:43 UTC
.github/workflows/release.yml | 91 ++++
README.md | 168 +++++++
composer.json | 2 +-
config/config.php | 386 +--------------
config/livewire-datatable.php | 42 ++
resources/views/datatable.blade.php | 475 +-----------------
resources/views/exports/pdf.blade.php | 74 ++-
resources/views/placeholders/datatable.blade.php | 150 +-----
.../views/templates/bootstrap/datatable.blade.php | 6 +-
.../views/templates/tailwind/datatable.blade.php | 7 +-
src/Components/DataTable.php | 543 ++++++++++++++++++---
src/DataSources/ModelDataSource.php | 61 ++-
src/Exports/DataTableExport.php | 6 +-
src/Exports/DataTableQueryExport.php | 141 ++++++
src/LivewireDatatableFacade.php | 8 +-
src/LivewireDatatableServiceProvider.php | 31 +-
src/Traits/WithExport.php | 163 +++----
src/Traits/WithFormatters.php | 17 +-
18 files changed, 1162 insertions(+), 1209 deletions(-)
Custom Export with Column Selection:
id, password, remember_token, timestamps, soft deletes)Per-Export Paper Size & Orientation:
$paperSize and $orientation parameters140 / columnCount) and cell padding (80 / columnCount)word-break: break-word prevents content overflow in PDF cellsEnhanced Export API:
export(string $type, ?array $selectedColumns, ?string $paperSize, ?string $orientation) — supports passing selected columns, paper size, and orientationcustomExport() action for Livewire modal integration#[Computed] exportColumns property — lists all exportable columns with labelsshowCustomExportPanel() / closeCustomExport() actions for modal managementtoggleCustomExportColumn(), selectAllExportColumns(), deselectAllExportColumns() for column selectionisHtml5ParserEnabled, isFontSubsettingEnabled, defaultFont => serif, dpi => 96 for better PDF rendering[@page](https://github.com/page) { margin: 10mm; } for consistent PDF marginsAdvanced Dynamic Filter System:
Default Sort Configuration:
Fully Dynamic CSS Classes:
Enhanced Export with Filtering:
getClass() methodfilterData() method for filtering logicgetQuery() computed property for filtered queriesAdded comprehensive export functionality:
Enhanced pagination system:
Enhanced API integration:
Added advanced value formatting system:
Improved pagination system:
simplePaginate method optionno column now sortable with proper numbering// Global config
'default_pagination' => 'simplePaginate', // or 'paginate'
// Per component
'pagination' => 'simplePaginate'
'columns' => [
'no' => '#', // Auto-numbered, sortable
'name' => 'Name',
'email' => 'Email'
]
// In your model
public function scopeActive($query) {
return $query->where('status', 'active');
}
// In component
'model' => User::class,
'scope' => 'active' // Apply the scope
# Update existing
composer update developerawam/livewire-datatable
# clear cache
php artisan optimize:clear
None - fully backward compatible
📝 Release Notes
🚀 Highlights
✨ Features
🔒 Security
How can I help you explore Laravel packages today?