Skip to content

Commit

Permalink
Update Collection.php
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored Mar 10, 2024
1 parent 322f4c6 commit 8b3f96b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Illuminate/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,9 @@ public function sortByDesc($callback, $options = SORT_REGULAR)
if (is_array($callback) && ! is_callable($callback)) {
foreach ($callback as $index => $key) {
$comparison = Arr::wrap($key);

$comparison[1] = 'desc';

$callback[$index] = $comparison;
}
}
Expand Down

0 comments on commit 8b3f96b

Please sign in to comment.