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 Datatable Only Arrays

Laravel Livewire Datatable Only Arrays Laravel Package

dndarksan/laravel-livewire-datatable-only-arrays

Livewire v2 + Bootstrap 4 datatable component for arrays only. Install via Composer and generate tables with php artisan make:dt-table. Define headers, columns, and records arrays to enable sortable/searchable columns and per-cell classes.

View on GitHub
Deep Wiki
Context7

Tabla de livewire usando solamente arreglos sin necesidad de un modelo, Idea basada en rappasoft/laravel-livewire-tables

Frequently asked questions about Laravel Livewire Datatable Only Arrays
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.
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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor