- Creating Columns
- Relationships
- Available Methods
- Other Column Types
- Column Selection
- Secondary Header
- Footer
Getting Started
Usage
DataTable
Columns
Rows
Sorting
Pagination
Search
Bulk Actions
Filters
Reordering
Secondary Header
Footer
Examples
Misc.
🎉 Enjoying this package? Consider sponsoring me on GitHub or buying me a beer.
This is the documentation for v2. You can switch versions in the menu on the left/at the top. Check your current version with the following command:
composer show rappasoft/laravel-livewire-tables
Clickable Rows
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.