Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from simonbuehler/paginate
Browse files Browse the repository at this point in the history
make pagination configurable
  • Loading branch information
alexjustesen authored May 14, 2022
2 parents 3f6d7ef + f8d2a79 commit a17cd02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/filament-spatie-laravel-activitylog.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

'resource' => [
'group' => null,
'sort' => null,
'sort' => null,
],

'paginate' => [5, 10, 25, 50],

];
4 changes: 4 additions & 0 deletions src/Resources/ActivityResource/Pages/ListActivities.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@
class ListActivities extends ListRecords
{
protected static string $resource = ActivityResource::class;
protected function getTableRecordsPerPageSelectOptions(): array
{
return config('filament-spatie-laravel-activitylog.paginate') ?? parent::getTableRecordsPerPageSelectOptions();
}
}

0 comments on commit a17cd02

Please sign in to comment.