diff options
author | Sam Light <samlight1994@gmail.com> | 2025-01-19 00:42:43 +0000 |
---|---|---|
committer | Sam Light <samlight1994@gmail.com> | 2025-01-19 00:42:43 +0000 |
commit | 27a26440b3104059ef890c95af850b9a43926a31 (patch) | |
tree | 3e63e09bfde291597963bd4914c0c80e05ce30b6 /src/TableComponent.php | |
parent | 9c01d445b928f38d811b4c29dd14119987685772 (diff) |
Coppied livewire pagination to my own
Diffstat (limited to 'src/TableComponent.php')
-rw-r--r-- | src/TableComponent.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/TableComponent.php b/src/TableComponent.php index da31a90..b8fae6a 100644 --- a/src/TableComponent.php +++ b/src/TableComponent.php @@ -6,6 +6,7 @@ use Livewire\Component; use Livewire\WithPagination; use Livewire\Attributes\Url; +use Illuminate\Pagination\Paginator; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Str; @@ -94,6 +95,8 @@ abstract class TableComponent extends Component $allColumns = $this->getColumns(); $columns = $allColumns->filter(fn($c) => in_array($c->name,$this->activeColumns)); + Paginator::defaultView('laralight-tables::pagination'); + return view('laralight-tables::table', [ 'searchable' => $this->searchable, 'searchDebounce' => $this->searchDebounce, |