Skip to content

Commit

Permalink
sort currencies names
Browse files Browse the repository at this point in the history
  • Loading branch information
MoamenEltouny committed Feb 5, 2022
1 parent aca7869 commit d5bb77c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Facades/Money.php
Expand Up @@ -232,10 +232,12 @@ public static function getCurrencySymbol()
*/
public static function getCurrenciesList()
{
$names = app('Money')->names;
foreach($names as $code => &$name) $name = $name['name'];
sort($names);

$names = array_map(function ($currency) {
return $currency['name'];
}, app('Money')->names);

asort($names);

return $names;
}

Expand Down

0 comments on commit d5bb77c

Please sign in to comment.