© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
F
Filament
•
3y ago
•
4 replies
Eric
How to apply sortable by default on tables
in my users resource
, by default i modify the query like so
:
User::query()->latest()
User::query()->latest()
i do it to sort it by default
, by more recents created first
.
but now i added the created
_at field to the user resource table
, so the user choose the sorting there
.
but as i am manually applying the sorting
, now the user cant sort be date since always applies the
latest()
latest()
so the question is
, how to correctly apply the initial sorting but then let the user change it
?
Filament
Join
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Minor - Switch `sortable()` default behaviour on tables?
F
Filament / ❓┊help
2y ago
Sortable by morph-relation
F
Filament / ❓┊help
3y ago
Pagination default value on tables
F
Filament / ❓┊help
3y ago
how apply sort desc in all tables
F
Filament / ❓┊help
3y ago