Laravel Livewire Tables Documentation

🎉 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 at the top. Check your current version with the following command:

composer show rappasoft/laravel-livewire-tables

Selected keys

If you would like access to just the selected primary keys in your bulk action method, you may use the selectedKeys property which return an array of the selected primary keys:

1public function exportSelected()
2{
3 if (count($this->selectedKeys)) {
4 // Do something with the selected rows
5 dd($this->selectedKeys);
6 
7// => [
8// 1,
9// 2,
10// 3,
11// 4,
12// ]
13 }
14 
15 // Notify there is nothing to export
16}

Note: See The primary key about where this value comes from.