- How do I install Laravel Livewire Tables in a Laravel 10 project?
- Run `composer require rappasoft/laravel-livewire-tables` and ensure Alpine.js 3+ is included in your project. No additional Laravel configuration is needed beyond Livewire’s base setup. Verify compatibility with Livewire 3.x in your `composer.json`.
- Does this package support custom queries (e.g., raw SQL or non-Eloquent collections)?
- The package is optimized for Eloquent models, but you can wrap custom queries in a collection and pass them to the table component. However, additional logic may be required to handle pagination, sorting, or filtering for non-Eloquent data sources.
- Can I use Laravel Livewire Tables with Bootstrap 5 or Tailwind CSS?
- Yes, the package supports both Bootstrap 4/5 and Tailwind CSS out of the box. The demos include Bootstrap 5 and Tailwind examples, and you can switch themes by overriding the default Blade templates or CSS classes in your project.
- What Laravel and Livewire versions are officially supported?
- The package is designed for Laravel 10+ and Livewire 3.x. While it may work with older versions, test thoroughly, especially for breaking changes in Livewire’s property synchronization or Alpine.js interactions. Check the GitHub repo for version-specific notes.
- How does performance compare to client-side table libraries like DataTables?
- This package renders tables server-side, reducing client-side payloads and improving performance for large datasets. However, heavy sorting/pagination operations may strain Laravel’s request lifecycle. Test with 10K+ rows to validate scalability for your use case.
- Is there built-in support for dark mode or theming?
- Yes, the package includes out-of-the-box dark mode support and theming flexibility. You can customize styles via Tailwind CSS classes or override Blade templates. The demos showcase Tailwind and Bootstrap themes for reference.
- Can I extend or override the table component’s behavior?
- The component is modular and designed for extension. You can override Blade templates, modify column definitions, or extend Livewire properties. For advanced customization, subclass the `DataTableComponent` and override methods like `buildTable()` or `getColumns()`.
- Are there any security concerns with dynamic columns or filters?
- The package relies on Livewire’s built-in CSRF protection and input validation. However, validate dynamic column names or filter values in your Livewire component to prevent injection risks. Use Eloquent’s query builder for safe database interactions.
- What alternatives exist for Laravel Livewire tables?
- Consider Filament Tables (enterprise-grade, 10K+ stars), Laravel Nova (official admin panel), or the official Livewire Tables package (more mature, community-driven). Evaluate based on your need for advanced features like nested sorting or collaborative editing.
- How do I migrate from DataTables or a custom Blade+JS solution to this package?
- Audit your existing table implementation for reusable components (e.g., column definitions, filters). Replace DataTables’ client-side logic with Livewire’s server-side rendering, and port column configurations to the package’s `Column` class. Start with a proof of concept for one low-complexity table.