From 927ee03756eab9a45826eb4f511f28323d0ea51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Perej=C3=B3n?= Date: Mon, 13 Mar 2017 18:03:00 +0100 Subject: [PATCH] Fix default sortBy order that is descending not ascending sortBy method default order is actually descending, not ascending. --- en/core-libraries/collections.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/core-libraries/collections.rst b/en/core-libraries/collections.rst index 8ba3002547..e8cd107d00 100644 --- a/en/core-libraries/collections.rst +++ b/en/core-libraries/collections.rst @@ -624,7 +624,7 @@ different values in the collection:: In order to specify in which direction the collection should be sorted, you need to provide either ``SORT_ASC`` or ``SORT_DESC`` as the second parameter for sorting in ascending or descending direction respectively. By default, -collections are sorted in ascending direction:: +collections are sorted in descending direction:: $collection = new Collection($people); $sorted = $collection->sortBy('age', SORT_ASC);