getDefault()); } } if (! function_exists('currency')) { /** Fetch a currency. If no argument is provided, the current currency will be returned. */ function currency(Currency|string $currency = null): Currency { if ($currency) { return $currency instanceof Currency ? $currency : currencies()->get($currency); } return currencies()->getCurrent(); } } if (! function_exists('currencies')) { /** Get the CurrencyManager instance. */ function currencies(): CurrencyManager { return app(CurrencyManager::class); } }