Weave 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
Laravel Currency Exchange Rates

Laravel Currency Exchange Rates Laravel Package

kantorge/laravel-currency-exchange-rates

A Laravel package for retrieving currency exchange rates. It provides a simple way to fetch and work with exchange rate data in your PHP applications, helping you convert currencies and integrate rate lookups into your Laravel projects.

Deep Wiki
Context7

A Laravel package for retrieving, storing, and working with currency exchange rates. It integrates exchange-rate providers into your application and exposes a simple API for fetching current rates, persisting historical values, and converting amounts between currencies. Configuration is handled through Laravel's standard config and service container, making it easy to swap providers or run updates on a schedule.

  • Pluggable exchange-rate providers behind a consistent interface
  • Database storage of rates for historical lookups and auditing
  • Currency conversion helpers for use in models or services
  • Artisan commands for scheduled rate updates
  • Configurable caching to reduce external API calls
Frequently asked questions about Laravel Currency Exchange Rates
How do I install kantorge/laravel-currency-exchange-rates in Laravel?
Install it with Composer using composer require kantorge/laravel-currency-exchange-rates. Laravel package discovery should register the service provider automatically. Then publish and review the package configuration before selecting providers or enabling caching.
Which currency exchange rate providers does this package support?
The package is designed to integrate multiple exchange rate providers rather than locking you into one source. Provider selection is configurable, so you can choose the source that fits your accuracy, coverage, and rate-limit needs. Check the package documentation for the exact provider adapters included in your version.
Can I cache exchange rates to reduce API calls?
Yes. Caching is a core part of the package's purpose: it can fetch rates and cache them so you avoid hitting provider APIs on every request. You configure the cache behavior through the package configuration, and you should align TTLs with how often your chosen provider updates rates.
Does it store historical exchange rate data?
Yes, the package is built to retrieve and manage historical currency exchange rate data. That lets you store past rates and use them for conversions, reporting, or reconciliation instead of relying only on the latest quote. The exact storage model and retention options are documented in the package configuration.
How do I convert currencies using this package?
Use the package's conversion API after rates have been fetched or loaded from storage. You typically specify the source currency, target currency, amount, and sometimes a date for historical conversion. The clean, configurable API is intended to keep conversion logic out of your controllers and models.
Is this package compatible with my Laravel version?
Compatibility depends on the package's Composer constraints, so check its composer.json for the supported PHP and illuminate/support versions. The package is Laravel-focused, but version support can change between releases. If you are on an older or very new Laravel version, test installation in a branch before upgrading production.
How do I configure multiple rate providers?
Provider configuration is handled in the package config file, where you can define which provider or providers to use. You can keep different settings per environment, such as a test provider locally and a production provider in production. Review each provider's API key, base URL, and rate-limit requirements before enabling it.
How should I test code that uses this package?
Keep tests deterministic by faking HTTP calls if your provider uses Laravel's HTTP client, or by pointing the package config at a stub provider. Avoid hitting real exchange rate APIs in your test suite because rates change and providers enforce rate limits. Then assert your conversion and storage logic against known fixture rates.
What are production considerations for exchange rate data?
In production, cache aggressively but respect provider update frequency, rate limits, and licensing terms. Historical rate storage can grow over time, so plan retention and indexing for date and currency pair lookups. Also schedule rate updates and monitor failures so stale rates do not silently affect financial calculations.
What alternatives exist to this package?
Alternatives include calling an exchange-rate API directly, using another Laravel currency package, or building a small service around a provider SDK. This package is most useful when you want multiple providers, caching, historical data, and conversion in one Laravel-integrated API. Compare provider coverage, historical depth, and maintenance activity before choosing.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource