summaryrefslogtreecommitdiff
path: root/src/Toolbar.php
diff options
context:
space:
mode:
authorSam Light <samlight1994@gmail.com>2025-03-30 14:20:57 +0100
committerSam Light <samlight1994@gmail.com>2025-03-30 14:20:57 +0100
commite744b8d67ef1d18050158dd523ba7d804c1c8528 (patch)
tree56c90a83912bd63bdd507e76e5ef00c82a904b50 /src/Toolbar.php
parenta883170dd1c723bcd02916f9bc8a96ed85a61761 (diff)
Filters, sorting, escaping and more....
Diffstat (limited to 'src/Toolbar.php')
-rw-r--r--src/Toolbar.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Toolbar.php b/src/Toolbar.php
index 2db39f5..8539e0e 100644
--- a/src/Toolbar.php
+++ b/src/Toolbar.php
@@ -5,7 +5,7 @@ namespace Lightscale\LaralightTables;
use Lightscale\LaralightTables\Toolbar\Item as ToolbarItem;
use Lightscale\LaralightTables\Toolbar\Search as SearchItem;
use Lightscale\LaralightTables\Toolbar\PageSize as PageSizeItem;
-use Lightscale\LaralightTables\Toolbar\Filter as FitlerItem;
+use Lightscale\LaralightTables\Toolbar\Filter as FilterItem;
use Illuminate\View\View;
use Illuminate\Support\Collection;
@@ -18,6 +18,7 @@ class Toolbar
protected Collection $startItems;
protected Collection $midItems;
protected Collection $endItems;
+ protected Collection $filterItems;
public function __construct(
private TableComponent $table
@@ -26,6 +27,7 @@ class Toolbar
$this->startItems = collect();
$this->midItems = collect();
$this->endItems = collect();
+ $this->filterItems = collect();
}
private function addItem(Collection $list, ToolbarItem $item): static
@@ -76,6 +78,11 @@ class Toolbar
return $this->pageSizeItem;
}
+ public function getFilters(): Collection
+ {
+ return $this->filterItems;
+ }
+
public function render(): View
{
return view('laralight-tables::toolbar', [