Closed
Description
At the moment, the package only supports sort parameters that directly relate to a field in the schema (i.e. a database column) - via the sortable()
method.
It should also be possible to add sort parameters that don't relate to a field. Need to add this in before 1.0
, as it is supported in the cloudcreativity/laravel-json-api
package.
As per the sortByLikes
example here:
https://laravel-json-api.readthedocs.io/en/latest/fetching/sorting/#implementing-sorting
And also it should be possible to do things like order-by sub-queries:
https://laravel-news.com/eloquent-subquery-enhancements
Metadata
Metadata
Assignees
Labels
No labels