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 Package

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.

View on GitHub
Deep Wiki
Context7

title: Clickable Rows weight: 1

To enable clickable rows on your table, you may add the following to the table component configuration:

public function configure(): void
{
    $this->setPrimaryKey('id')
        ->setTableRowUrl(function($row) {
            return route('admin.users.show', $row);
        })
        ->setTableRowUrlTarget(function($row) {
            if ($row->isExternal()) {
                return '_blank';
            }

            return '_self';
        });
}

If you would like to make a certain cell unclickable (i.e. if you have something else clickable in that cell), you may do so by adding the following to the column configuration:

Column::make('Name')
    ->unclickable(),

Note: LinkColumns are not clickable by default to preserve the intended behavior of the link.

Using wire:navigate

To use wire:navigate, you should return "navigate" as the target for setTableRowUrlTarget

public function configure(): void
{
    $this->setPrimaryKey('id')
        ->setTableRowUrl(function($row) {
            return route('admin.users.show', $row);
        })
        ->setTableRowUrlTarget(function($row) {
            if ($row->isExternal()) {
                return '_blank';
            }

            return 'navigate';
        });
}

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport