Sorting is not working

Hello there,
i'm trying to sort date column. field name is "since"
So, i did the following in Resource.
but it is not showing properly. tried with 'asc' but didn't work


protected function getTableQuery(): Builder
{
return parent::getTableQuery()->orderBy('since', 'desc')->whereStatus(false);
}
image.png
Solution
The image you showed appears to be sorted?

Have you tried using defaultSort() on a column?

https://filamentphp.com/docs/3.x/tables/columns/getting-started#sorting-by-default
Was this page helpful?