alp-develop/laravel-livewire-tables
Full-featured reactive data tables for Laravel: search, sort, filter, paginate, export, and bulk actions with zero JavaScript. Supports Livewire 3–4, Tailwind, Bootstrap 5/4, and dark mode.
Architecture fit. The package is a Livewire-native data table abstraction built around a clean, separable core: an immutable State value object, a Engine that runs a SearchStep → FilterStep → SortStep pipeline, and a component base class (DataTableComponent) that developers extend via configure(), query(), columns(), filters(), and bulkActions(). This is the right shape for a Laravel/Livewire monolith: state is centralized, the query pipeline is testable in isolation, and the "zero JavaScript" promise means no separate frontend build or JS runtime to operate. It fits teams already standardized on Livewire; it is a poor fit for Inertia/React or API-first frontends, where the server-side pipeline model adds little value.
Integration feasibility. Onboarding is conventional Composer plus Artisan: composer require, vendor:publish --tag=livewire-tables-config, set theme to tailwind/bootstrap-5/bootstrap-4, add the [x-cloak] CSS rule for Tailwind, then scaffold with php artisan make:livewiretable. The API surface is small and declarative, so a spike is cheap. The dependency footprint is Laravel + Livewire only, and a Compat utility does runtime version detection, which lowers the risk of silent breakage across the declared support matrix.
Technical risk. The dominant risk is adoption, not technology: 7 stars, 0 dependents, and an apparent single-maintainer identity (alp-develop) imply a thin bus factor and near-zero field validation at scale. Secondary risks:
Livewire\Tables\... — a prefix inside Livewire's own namespace. This is a red flag for autoload shadowing and conflicts with Livewire core or other table packages, and it will not be trivially fixable without a breaking change.composer install without post-install Artisan steps.ActionColumn icons, DateRangeFilter DoS, CSS injection via config colors, TOCTOU on bulk IDs, #[Locked] on selection properties, sort-field whitelisting). That the maintainer shipped these is positive; that they existed in a 1.x line is a reminder that this is young code and the security review cadence is not yet proven. Note BladeColumn deliberately outputs raw HTML — escape-by-convention is a standing XSS surface for developers.Key questions for the maintainer/team.
Livewire\Tables namespace intentional, and has it been tested against Livewire 4 and other table packages in the same app?Engine/State contract considered stable public API?Stack fit. Laravel 10–13, Livewire 3–4, PHP 8.1–8.5, Tailwind or Bootstrap 5/4 with dark mode. For a team already on Livewire 3 and Tailwind, adoption is close to drop-in. The one hard prerequisite is config publishing and theme selection; for Bootstrap shops, the theme aliases (bootstrap5, bootstrap, bootstrap4) cover the common cases.
Migration path. Two entry points:
DataTableComponent subclass is a clean extraction target. Port one table at a time: move query() to Eloquent, move column logic into columns(), and move any where clauses into typed filters (SelectFilter, TextFilter, DateRangeFilter). Server-side search/sort/pagination come for free.rappasoft/laravel-livewire-tables) — expect a real rewrite, not a rename. The component contract (configure()/query()/columns()/filters()) and column DSL differ. Budget per-table effort and do not attempt a global find-and-replace.Compatibility. The declared matrix is broad on paper (PHP 8.1–8.5, Laravel 10–13, Livewire 3–4). Verify against your actual pinned versions in a scratch branch, and specifically test the combinations you will run in production. The Compat runtime detection mitigates drift but is not a substitute for a matrix test in CI. The namespace concern should be validated early with a composer require in a real app that also has Livewire and any other Livewire-dependent packages installed.
Sequencing.
table-key to every multi-instance usage, establish an escape policy for BladeColumn, and write tests for bulk-action authorization.DataTableComponent so a swap is contained.Maintenance. The realistic maintenance model is "adopt and be prepared to own." Single-maintainer risk plus zero dependents means the team should plan for a periodic manual review of upstream commits and a fork-and-patch capability. MIT licensing makes the fork option viable, but forking a Livewire component with a Livewire\Tables namespace is not a trivial long-term path — this is the strongest argument for a thin internal abstraction layer over the package. The dense 1.2.2 security changelog also implies ongoing remediation load: expect to track upstream releases closely, especially around auth-sensitive features (bulk actions, export, filters).
Support. Community-only: no vendor SLA, no support contract. Mitigant: documentation is genuinely strong — installation, configuration, columns, filters, bulk actions, export, events/hooks, toolbar slots, theming, dark mode, joins, and a dedicated security doc, plus a quick-start that maps to an Artisan generator. Internal ramp-up should therefore be light. The gap is operational support: no one to call during an incident, so the team needs its own runbook.
Scaling. The architecture scales sensibly for server-side paginated tables: the 1.2.2 performance work (memoized filter resolution, O(1) filter/sort maps pre-built in constructors, cached searchable columns and alias maps, a rebuilt export query that reuses the cached Engine, dirty-tracking session writes) shows the maintainer has thought about per-request cost. Two scaling realities to plan around:
setEagerLoad() exists, so declare relations deliberately; otherwise N+1 on joined/computed columns will dominate latency.LIKE-based, now capped at 200 characters. For large datasets, index-plan review and possibly search-backend substitution (or custom filter callbacks) will be needed; the package is not a search engine.Failure modes to design against.
table-key. Mitigation: mandate table-key in the team's component conventions.BladeColumn raw HTML → XSS by design. Mitigation: code-review rule requiring explicit escaping.#[Locked] behavior may shift. Mitigation: pin Livewire minor versions and gate upgrades behind the package's own compatibility release.Ramp-up. Low for a Livewire-fluent team: the quick-start is a working component in minutes, and the Artisan generator plus per-topic docs (columns, filters, bulk actions, export, joins, theming, events) cover the learning curve. Budget roughly a day per developer plus the spike, and add a short internal "conventions" note covering table-key, BladeColumn escaping, setEagerLoad(), and bulk-action authorization. The residual onboarding cost is not the API — it is establishing the team's own guardrails around an unproven dependency.
How can I help you explore Laravel packages today?