Skip to content

Commit

Permalink
Update README with new sort details
Browse files Browse the repository at this point in the history
  • Loading branch information
rbibby committed Jun 29, 2022
1 parent 495dc65 commit 4fddb22
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ Sieve will also allow consumers of your API to specify sort order. You can do th
* `sort=age:asc`
* `sort=id:desc`

By default, MySQL will sort `null` values first for ascending sorts and last for descending sorts. Depending on the context
of the column this may not be the desired functionality. You can change this using the following URL queries:

* `sort=priority:asc_nulls_last`
* `sort=priority:desc_nulls_first`


You can set a default sort using the `setDefaultSort` on the`Sieve` class.

```php
Expand Down

0 comments on commit 4fddb22

Please sign in to comment.