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 Exchange Rates

Laravel Exchange Rates Laravel Package

ashallendesign/laravel-exchange-rates

A Laravel package for fetching live exchange rates and converting between currencies. It offers a clean, cache-friendly API with multiple drivers, historical rate support, validation rules for currency codes, and built-in caching, making currency conversion easy to add to any Laravel app.

View on GitHub
Deep Wiki
Context7

Laravel Exchange Rates is a simple, elegant package for fetching and converting currency exchange rates in Laravel applications. It provides a clean, expressive API on top of the exchangerate.host API, letting you get live rates, convert amounts between currencies, and retrieve historical rates—all through a fluent, familiar Laravel-style interface. With built-in caching to reduce redundant API calls and full support for dependency injection and facades, it fits naturally into any Laravel codebase.

  • Retrieve live exchange rates for single or multiple currencies
  • Convert amounts between currencies with a single method call
  • Access historical rates for any supported past date
  • Built-in caching to improve performance and limit API requests
  • Supports Carbon date instances and a driver-based architecture for easy testing
Frequently asked questions about Laravel Exchange Rates
How do I install ashallendesign/laravel-exchange-rates?
Install it with Composer using composer require ashallendesign/laravel-exchange-rates. Laravel package auto-discovery should register the service provider, but check the README for any publishable config or migration steps. Add your exchangeratesapi.io API key through your .env file or a secrets manager rather than committing it.
Which Laravel and PHP versions does laravel-exchange-rates support?
The supported Laravel and PHP constraints are defined in the package composer.json and should be checked on Packagist before installing. Because this is a third-party wrapper, confirm it supports your application's Laravel major version and PHP runtime. If you run an older Laravel release, you may need to upgrade or fork the package.
Do I need an exchangeratesapi.io API key to use this package?
Yes. The package is a wrapper around the exchangeratesapi.io HTTP API, so it depends on that third-party service for rates and availability. You normally provide an API key through environment configuration or a secrets manager. Authentication failures and quota errors are controlled by the API provider and should be handled as exceptions in your integration.
Does laravel-exchange-rates cache exchange rates?
The package is presented as helping you fetch, cache, and validate exchange rates, so caching is part of its intended workflow. You should still define explicit TTLs per use case, such as spot display, daily close, and historical lookups, and verify how it uses your Laravel cache driver. For billing or reporting, persist the rates you actually used rather than relying only on cache.
Can I convert currencies with laravel-exchange-rates?
Yes, the package provides helpers for currency conversion using rates fetched from exchangeratesapi.io. For production use, validate rate precision, rounding behavior, and timestamp semantics before using conversions in pricing, invoicing, or ledgers. It is best to wrap the package behind your own ExchangeRateService so domain code is not coupled directly to the vendor.
Does it support historical exchange rates?
Because the package wraps exchangeratesapi.io, historical rate support depends on the API endpoints and plan you provision from the provider. Confirm the historical depth, base-currency restrictions, and quota limits for your plan before relying on it. Store historical rates locally if you need auditability or reconciliation.
How should I test code that uses laravel-exchange-rates?
Mock HTTP responses in your test suite instead of calling the live exchangeratesapi.io API. Add contract tests for successful responses, authentication failures, timeouts, malformed payloads, and quota errors. Laravel's HTTP fake utilities or package-level mocking can keep tests deterministic and fast in CI.
Is laravel-exchange-rates suitable for billing or invoicing?
Do not use it in billing or invoicing without validation. Rates come from a third-party SaaS API, so you must verify precision, rounding, timestamp semantics, historical consistency, and data licensing terms. Run it in shadow mode against your existing rate source and reconcile results before any financial cutover.
Can I swap exchangeratesapi.io for another provider later?
The package is a thin wrapper around exchangeratesapi.io, so switching providers is easier if you hide it behind an internal ExchangeRateService interface. Implement that interface with this package as the first adapter, then add adapters for exchangerate.host, OpenExchangeRates, or a treasury feed later. Avoid calling the package directly throughout your domain code.
What are the maintenance and production risks of laravel-exchange-rates?
The package has a single maintainer, modest star count, and limited downstream production evidence, so due diligence is important. Upstream API pricing, quotas, schema changes, and terms are controlled by exchangeratesapi.io, not the package. Pin versions, monitor updates, add timeouts, retries, quota alerts, and a fallback policy before relying on it in production.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo