I have an instance of the Laravel Illuminate collection. An array contains several properties.
I need to be able to sort the collection based on two different attributes.
I want to sort the attribute first, which is called "sort", and then the attribute "title".
Also, I have another collection that I like to sort by sort column if the sort value is not null, and then shuffle the elements for which the null value is sort.
How can I do this type of sorting?
source
share