How to use defaultSort as orderByRaw?
Hi, just want to ask how to achieve a defaultSort with a certain
status
like invited, active, revoked
etc. I have achieve this behavior using protected function getTableQuery(): Builder
but my problem is that whenever I have ->sortable()
in my columns it remains the sorting as invited, active, revoked etc
and the only changing is how the rows sorted but the sorting overall is same with the arrangment of status.

2 Replies
I think this could be a good use-case for a computed column with
virtualAs()
:
https://pineco.de/using-computed-columns-in-laravel/table