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()
Jump to solution
3 Replies
awcodes
awcodes2y ago
parent::getTableQuery()->latest() Try that.
Solution
Dennis Koch
Dennis Koch2y ago
Or just use ->defaultSort()
Chrysippus
ChrysippusOP2y ago
thankyou Sir/s it's working now!

Did you find this page helpful?