- Does this package work with Laravel 10 and Livewire v2?
- Yes, it’s explicitly designed for Laravel 9/10 with Livewire v2. Ensure your project meets these requirements before installing. No Livewire v3 or Laravel 11 support exists yet.
- How do I install and set up the datatable in a Laravel project?
- Run `composer require dndarksan/laravel-livewire-datatable-only-arrays`, then generate a table component with `php artisan make:dt-table TableName`. Configure `encabezados()`, `columnas()`, and `registros()` methods in the generated class.
- Can I use Eloquent models directly, or do I need to convert them to arrays?
- You must convert Eloquent results to arrays using `toArray()` in the `registros()` method. This forces a strict array structure, which simplifies the package but adds manual preprocessing overhead.
- Will this work with Bootstrap 5 or Tailwind CSS?
- No, it’s hardcoded for Bootstrap 4.6.3. If you’re using Bootstrap 5 or Tailwind, you’ll need to manually override styles or explore alternatives like `rapappel/laravel-livewire-tables`.
- Does this package support server-side processing for large datasets?
- No, it relies on client-side filtering/sorting by default. For large datasets, you’ll need to extend it manually or implement server-side logic (e.g., Livewire’s `wire:model.debounce`).
- Are there any JavaScript dependencies beyond Livewire’s default setup?
- No additional JS libraries are required. It uses Livewire’s built-in JavaScript, but ensure your project has Livewire’s default JS included (e.g., via `@livewireScripts`).
- How do I add sorting or search functionality to columns?
- Enable sorting by setting `sorteable => true` in `encabezados()` and specifying a `campo` (field name). For search, use `searchable => true` with the same `campo` key. Both require the field to exist in your array data.
- What are the alternatives if this package lacks features like custom cell rendering?
- Consider `rapappel/laravel-livewire-tables` (more flexible, supports Vue/React) or `filamenttables/filament-tables` (for Filament users). These offer better customization but may require more setup.
- Is this package suitable for production use, or is it still experimental?
- It’s a lightweight solution but lacks community adoption (0 stars, no dependents). Test it in a non-critical module first. Monitor for updates, as it’s a recent release with a single maintainer.
- How do I migrate from this package if I switch to Livewire 3 or Bootstrap 5 later?
- There’s no guaranteed migration path. You’d need to rebuild the table logic manually or fork the package. Document your customizations early to ease future transitions.