© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
bwurtz999

Fast Pagination

@Dan Harrin I implemented the trick for fast pagination you outlined (https://filamentphp.com/community/danharrin-fast-table-pagination) but there is one issue. When selecting
All
All
records, it returns an error for trying to multiply
string * int
string * int
.

I changed the function to:

protected function paginateTableQuery(Builder $query): Paginator
    {
        return $query->fastPaginate(($this->getTableRecordsPerPage() == 'all') ? 9999 : $this->getTableRecordsPerPage());
    }
protected function paginateTableQuery(Builder $query): Paginator
    {
        return $query->fastPaginate(($this->getTableRecordsPerPage() == 'all') ? 9999 : $this->getTableRecordsPerPage());
    }


and that avoids the error. I'm not sure if there is a better way around this.

I didn't see a way to comment on the community post so I'm doing it here. Just wanted you to know. Filament is amazing - thank you!
Filament
How to improve table pagination performance by Dan Harrin - Filament
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
How to improve table pagination performance by Dan Harrin - Filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

extra pagination?
FilamentFFilament / ❓┊help
2y ago
Pagination Bug
FilamentFFilament / ❓┊help
3y ago
Pagination overlapping
FilamentFFilament / ❓┊help
3y ago
Pagination error
FilamentFFilament / ❓┊help
3y ago