Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Currency List

Currency List Laravel Package

umpirsky/currency-list

Provides up-to-date lists of world currencies for PHP apps, extracted from CLDR. Includes currency codes, names and symbols in many locales, easy to install via Composer and use for dropdowns, validation, and formatting.

View on GitHub
Deep Wiki
Context7

:moneybag: List of all currencies with names and ISO 4217 codes in all languages and all data formats.

Frequently asked questions about Currency List
How do I install umpirsky/currency-list in a Laravel project?
Run `composer require umpirsky/currency-list` in your project root. The package has no Laravel-specific dependencies and works as a standalone PHP library. For Laravel integration, you can publish config files or bind it to the service container.
Which Laravel versions does this package support?
The package is framework-agnostic and works with any PHP 7.4+ project, including Laravel 8.x, 9.x, and 10.x. No Laravel-specific version constraints are enforced, but ensure your PHP version matches Laravel’s requirements.
Can I use this package to populate a database table for currencies?
Yes. The package provides CSV and JSON exports, making it easy to seed a database table. You can create a `Currency` model and use the package’s data in a seeder class (e.g., `CurrencySeeder`) to initialize your table.
Does this package support dynamic currency updates (e.g., ISO 4217 changes)?
The package ships with static data, so updates require manual intervention. For dynamic updates, you could extend the package to fetch the latest ISO 4217 data via their official API or a cron job, then merge it with the existing dataset.
How do I display currency names/symbols in Blade templates?
You can create a helper function or facade to access the data. For example, add a `Currency` facade in `app/Providers/AppServiceProvider` and use it in Blade like `@currency('EUR', 'en')` to display the Euro name in English.
What if my app needs only a subset of locales (e.g., EU languages)?
The package includes all supported locales by default, but you can filter the data in your application logic. For example, load only `['en', 'de', 'fr']` locales when initializing the package or query the data array programmatically.
Are there alternatives to this package for Laravel currency data?
Yes. Alternatives include `moneyphp/money` (for financial calculations) or `laravel-money/laravel-money` (Laravel-specific). However, those focus on monetary operations, while `umpirsky/currency-list` specializes in localized names/symbols for display purposes.
How do I cache currency data for better performance?
Cache the loaded currency data using Laravel’s cache system. For example, wrap the data fetch in `cache()->remember()` with a tag (e.g., `currencies`) to invalidate it when updates occur. This avoids reloading the dataset on every request.
Does this package include validation for currency codes (e.g., ISO 4217 compliance)?
The package provides accurate ISO 4217 codes, but validation logic (e.g., rejecting invalid codes) must be implemented in your application. You can extend the package or create a service layer to add custom validation rules.
How do I test this package in my Laravel application?
Test the package by verifying ISO codes, locale-specific names, and symbols. Use PHPUnit to assert data integrity (e.g., `assertEquals('Euro', CurrencyList::get('en')->get('EUR')->name)`). For localization, test edge cases like missing translations or unsupported locales.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata