Skip to content

Commit

Permalink
feat: order currencies by code (#7009)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaiss committed Nov 7, 2023
1 parent acc73ed commit 43ce1d2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ class CurrencyIndexViewHelper
public static function data(Account $account, int $currencyId = null): Collection
{
$currenciesCollection = $account->currencies()
->where('active', true)->get()->map(function ($currency) use ($currencyId) {
->orderBy('code')
->where('active', true)
->get()
->map(function ($currency) use ($currencyId) {
return [
'id' => $currency->id,
'name' => $currency->code,
Expand Down

0 comments on commit 43ce1d2

Please sign in to comment.