Skip to content

Commit

Permalink
Add sortRecursiveDesc() method (laravel#46945)
Browse files Browse the repository at this point in the history
Co-authored-by: Volodya Khurshudyan <volodya.khurshudyan@softconstruct.com>
  • Loading branch information
xurshudyan and Volodya Khurshudyan committed May 3, 2023
1 parent d800f9e commit 6e8b883
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Illuminate/Collections/Arr.php
Expand Up @@ -770,6 +770,18 @@ public static function sortRecursive($array, $options = SORT_REGULAR, $descendin
return $array;
}

/**
* Recursively sort an array by keys and values in descending order.
*
* @param array $array
* @param int $options
* @return array
*/
public function sortRecursiveDesc($array, $options = SORT_REGULAR)
{
return $this->sortRecursive($array, $options, true);
}

/**
* Conditionally compile classes from an array into a CSS class list.
*
Expand Down

0 comments on commit 6e8b883

Please sign in to comment.