The `sortBy` method in the PHP Illuminate\Support\Collection allows you to sort the items in a collection based on a given key or callback function. This method provides a simple way to sort the collection in ascending order based on the specified key. It can also be used to sort the collection in a customized way by providing a callback function to determine the sorting order. This method returns a new collection containing the sorted items, while the original collection remains unchanged.
PHP Illuminate\Support Collection::sortBy - 28 examples found. These are the top rated real world PHP examples of Illuminate\Support\Collection::sortBy extracted from open source projects. You can rate examples to help us improve the quality of examples.