- Making Columns
- Built-in searching
- Built-in sorting
- Built-in cell formatting
- Conditional columns
- User column selection
- Secondary Header Functionality
- Footer Functionality
- Misc. Functionality
Getting Started
Usage
Columns
The Query
Row
Bulk Actions
Filters
Customizing
Display
🎉 Enjoying this package? Consider sponsoring me on GitHub or buying me a beer.
This is the documentation for v1 but the latest version is v3. 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
Footer Functionality
The following footer methods are only available in v1.16 and above
You have 2 options when it comes to footer rows:
1. Use the header as the footer
1public bool $useHeaderAsFooter = true;
This literally duplicates the header, including bulk selection, sorting, etc.
2. Customize the footer cell for each column
You can pass a footer
method to each column which will be passed all the rows that are on that page.
1Column::make('Sales')2 ->sortable()3 ->footer(fn($rows) => 'Total: ' . $rows->sum('sales')),
1Column::make('Sales')2 ->sortable()3 ->asHtml()4 ->footer(fn($rows) => '<strong>Total:</strong> ' . $rows->sum('sales')),
1Column::make('Sales')2 ->sortable()3 ->footer(fn($rows) => view('includes.cells.sales')->withRows($rows)),
Calling footer
on any column will enable the custom footer, any column without a footer
method will just contain a blank cell.
See also, row and cell customization.
Note: the asHtml()
column method is used for both the data and the secondary header/footer cells.