Documentation version
v4 (master)
v2 (v2-master)
v1 (v1)
Documentation page
Introduction
Support Me
Questions and Issues
Changelog
Upgrade Guide
Requirements
Installation
Configuration
Rendering
Commands
Creating Components
The Query
Configuration
Available Methods
Events
Configurable Areas
Creating Columns
Relationships
Available Methods
Other Column Types
Column Selection
Secondary Header
Footer
Clickable Rows
Available Methods
Available Methods
Available Methods
Introduction
Creating Bulk Actions
Processing Bulk Actions
Available Methods
Introduction
Creating Filters
Applying Filters
Available Methods
Introduction
Setup
Saving
Available Methods
Available Methods
Available Methods
Basic Example
Advanced Example
Bulk Action Export
Refreshing
Multiple Tables Same Page
Adding Custom Markup
Debugging
Sponsor: Introduction
Re-using attributes across tables
Basic Modal Example
Clicking a row to edit in a modal
You are reading documentation for v2 .
The latest version is v4 .
Switch versions from the documentation menu. Check the installed version with:
composer show rappasoft/laravel-livewire-tables
You can create components by using the command or copying from one of the examples .
This is what a bare bones component looks like before your customization:
1 <?php
2
3 namespace App \ Http \ Livewire ;
4
5 use App \ Models \ User ;
6 use Rappasoft \ LaravelLivewireTables \ DataTableComponent ;
7 use Rappasoft \ LaravelLivewireTables \ Views \ Column ;
8
9 class UsersTable extends DataTableComponent
10 {
11 protected $ model = User :: class ;
12
13 public function configure (): void
14 {
15 $this-> setPrimaryKey ( ' id ' );
16 }
17
18 public function columns (): array
19 {
20 return [
21 Column :: make ( ' ID ' , ' id ' )
22 -> sortable (),
23 Column :: make ( ' Name ' )
24 -> sortable (),
25 ];
26 }
27 }
Your component will extend the Rappasoft\LaravelLivewireTables\DataTableComponent class and at minimum implement 2 methods called configure and columns .