Laravel - Collections - Method Sortdesc
This method will sort the collection in the opposite order as the
$collection = collect([5, 3, 1, 2, 4]); $sorted = $collection->sortDesc(); $sorted->values()->all(); // [5, 4, 3, 2, 1]
sort, you may not pass a closure to
sortDesc. Instead, you should use the
sort method and invert your comparison.