egeriis / laravel-jsonapi

Make it a breeze to create a jsonapi.org compliant APIs with Laravel 5.
MIT License
146 stars 27 forks source link

Adjusted sorting in handler to match jsonapi.org spec #44

Closed wireblue closed 9 years ago

wireblue commented 9 years ago

According to the jsonapi.org spec you specify a list of columns you wish to sort by. By default all columns are sorted Ascending, however any columns prefixed by a hyphen (-) are sorted Descending.

There is no mention of a plus (+) prefix in the current spec. I'm assuming this was in a previous draft of the spec. This change removes the plus (+) prefix feature in favour of the Ascending by default rule.

http://jsonapi.org/format/#fetching-sorting