The SORT_NATURAL Flag | Laravel 5 Collections: Sorting a Collection Based on a Key Value With sortBy
The SORT_NATURAL treats each item as a string while using a "natural ordering" algorithm to perform the sorting. The following code example shows how to use the SORT_NATURAL flag when sorting the $collection created previously (the callback...