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
awcodes16mo ago
parent::getTableQuery()->latest() Try that.
Solution
Dennis Koch
Dennis Koch16mo ago
Or just use ->defaultSort()
Chrysippus
ChrysippusOP16mo ago
thankyou Sir/s it's working now!
Want results from more Discord servers?
Add your server