Weave Code
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 Livewire Tables

Laravel Livewire Tables Laravel Package

alp-develop/laravel-livewire-tables

Reactive Livewire data tables for Laravel—search, sort, filter, paginate, export, and bulk actions with zero JavaScript. Supports Laravel 10–13, Livewire 3–4, PHP 8.1+, Tailwind or Bootstrap 4/5, plus dark mode and configurable themes.

View on GitHub
Deep Wiki
Context7

Datatable package for Laravel using Livewire 3 & 4. Build powerful, reactive tables with sorting, filtering and pagination. Compatible with Laravel 10+ and PHP 8.1+.

Frequently asked questions about Laravel Livewire Tables
How do I install and set up Laravel Livewire Tables in a Laravel 11 project?
Run `composer require alp-develop/laravel-livewire-tables`, then publish the config with `php artisan vendor:publish --tag=livewire-tables-config`. Configure the theme (Tailwind, Bootstrap 4/5) in `config/livewire-tables.php`, and ensure Livewire is installed. The package requires Livewire 3 or 4 and Laravel 10+.
Can I use this package without Livewire? What’s the alternative?
No, this package requires Livewire 3 or 4. If you’re not using Livewire, consider alternatives like `yajra/laravel-datatables` (jQuery-based) or `spatie/laravel-query-builder` for custom table logic. Adopting Livewire may simplify reactivity but adds a dependency.
Does Laravel Livewire Tables support complex Eloquent queries with joins or nested relationships?
Yes, the pipeline pattern allows you to build queries with joins, subqueries, or relationships in the `query()` method. For nested relationships, use `with()` or eager load in the query builder. The package doesn’t restrict query complexity but relies on Eloquent’s capabilities.
How do I customize the table theme or add dark mode support?
Set the theme in `config/livewire-tables.php` (e.g., `'theme' => 'tailwind'`). For dark mode, enable it in the config and ensure your Tailwind/Bootstrap setup supports CSS variables or dark mode classes. The package handles toggling via session or client-side CSS.
What’s the best way to handle bulk actions like delete or export in large datasets?
Use the built-in `ActionColumn` or `BulkActionColumn` for delete/export. For large datasets, optimize with `setPerPage()` or cursor pagination. Bulk actions trigger server-side logic, so ensure your model methods (e.g., `delete()`) are efficient and include authorization checks.
Will this package work with Laravel 14 when released? What about Livewire 5?
The package currently supports Laravel 10–13 and Livewire 3–4. Check the GitHub repo for updates on Laravel 14 or Livewire 5 compatibility. If Livewire 5 drops breaking changes, you may need to wait for a package update or fork it.
How do I test a custom Livewire table component with PHPUnit?
Test the component by mocking dependencies (e.g., Eloquent models) and asserting table state. Use Livewire’s testing helpers like `render()` or `call()` to simulate user interactions. The package doesn’t include built-in test helpers, so rely on Livewire’s testing utilities.
Can I integrate this with a custom frontend framework like Alpine.js or Inertia.js?
The package renders tables via Blade components and relies on Livewire’s reactivity. For Alpine.js or Inertia.js, you’ll need to adapt the styling (e.g., CSS classes) or use the package’s output as a base. Tailwind/Bootstrap themes are the primary focus.
What happens if JavaScript is disabled? Does the package degrade gracefully?
The package requires Livewire’s JavaScript for reactivity (sorting, filtering). Without JS, users see static data. For graceful degradation, consider server-side fallbacks (e.g., a non-Livewire table view) or inform users that interactivity requires JS.
How do I add a custom filter (e.g., date range) or column type to the table?
Extend the package’s filter/column classes (e.g., `SelectFilter`, `TextColumn`) or create new ones by implementing the `Filter` or `Column` interfaces. Register them in your table’s `configure()` method. The pipeline pattern makes it easy to plug in custom logic.
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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata