Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentβ€’2y agoβ€’
35 replies
zemo

Order TextColumn relationship results by desc

this might be an easy thing but I can't find a way to do it πŸ˜…
as shown in the screenshot, I have a TextColumn that loads results from a relationship. So there might be multiple years. I would like to order them by desc, so that the latest year appears as first. How do I do that?

Tables\Columns\TextColumn::make('subscriptions.subscriptionYear.year')
    ->label('Iscrizioni')
    ->searchable()
    ->listWithLineBreaks()
    ->limitList(1)
    ->expandableLimitedList(),
Tables\Columns\TextColumn::make('subscriptions.subscriptionYear.year')
    ->label('Iscrizioni')
    ->searchable()
    ->listWithLineBreaks()
    ->limitList(1)
    ->expandableLimitedList(),
sortbydesc.png
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

Order table by his relationship
FilamentFFilament / β“β”Šhelp
3y ago
Order By for Global Search Results
FilamentFFilament / β“β”Šhelp
9mo ago
How to sort TextColumn by relationship date attribute?
FilamentFFilament / β“β”Šhelp
3y ago
TextColumn get relationship record
FilamentFFilament / β“β”Šhelp
2y ago