Allow sorting on computed field by binding to database column #5800
-
|
Allow sorting of computer fields by binding to a database column: For example: |
Beta Was this translation helpful? Give feedback.
Answered by
davidhemphill
Aug 11, 2023
Replies: 2 comments
-
|
Could you not do this? Text::make('Time Difference', 'date')
->displayUsing(fn ($value) => $value->diffForHumans())
->sortable(); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
davidhemphill
-
|
Yes! That works. Didn't know that existed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you not do this?