rappasoft/laravel-livewire-tables
Laravel Livewire Tables provides dynamic, feature-rich data tables for Laravel Livewire with sorting, searching, filtering, pagination, bulk actions, and Bootstrap/Tailwind support. Build reusable table components backed by Eloquent queries.
WireLink columns provide a way to display Wired Links in your table without having to use format() or partial views, with or without a Confirmation Message
WireLinkColumn requires title, and an "action", which must be a valid LiveWire method in the current class, or a global method
Without a Confirmation Message
WireLinkColumn::make("Delete Item")
->title(fn($row) => 'Delete Item')
->action(fn($row) => 'delete("'.$row->id.'")'),
You may also pass a string to "confirmMessage", which will utilise LiveWire 3's "wire:confirm" approach to display a confirmation modal.
WireLinkColumn::make("Delete Item")
->title(fn($row) => 'Delete Item')
->confirmMessage('Are you sure you want to delete this item?')
->action(fn($row) => 'delete("'.$row->id.'")')
->attributes(fn($row) => [
'class' => 'btn btn-danger',
]),
And you may also pass an array of attributes, which will be applied to the "button" element used within the Column
WireLinkColumn::make("Delete Item")
->title(fn($row) => 'Delete Item')
->action(fn($row) => 'delete("'.$row->id.'")')
->attributes(fn($row) => [
'class' => 'btn btn-danger',
]),
Please also see the following for other available methods:
How can I help you explore Laravel packages today?