Skip to content

Support sort parameters that do not relate to a column #14

Closed
@lindyhopchris

Description

@lindyhopchris

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions