© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
Chrysippus

How to sort resource table into latest()?

I'm trying to set the default of data of my resource table to be latest or orderByDesc but its not working


protected function getTableQuery(): Builder
    {
        return Activity::query()->latest();
    }
protected function getTableQuery(): Builder
    {
        return Activity::query()->latest();
    }

am I missing something?
Solution
Or just use
->defaultSort()
->defaultSort()
Jump to solution
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

Sort data in Resource Table
FilamentFFilament / ❓┊help
3y ago
How to sort table by relationship?
FilamentFFilament / ❓┊help
15mo ago
How to sort the table using model accessor
FilamentFFilament / ❓┊help
2y ago
how to display sort selections with Table ViewColumn?
FilamentFFilament / ❓┊help
3y ago