PHPackages                             martian/euro-currency-exchange - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. martian/euro-currency-exchange

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

martian/euro-currency-exchange
==============================

A Laravel package for converting euro to other currency

1.0.0(3y ago)05MITPHPPHP ^7.4|^8.0

Since May 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/hendurhance/euro-currency-exchange)[ Packagist](https://packagist.org/packages/martian/euro-currency-exchange)[ Docs](https://github.com/hendurhance/euro-currency-exchange)[ RSS](/packages/martian-euro-currency-exchange/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Euro Currency Exchange
======================

[](#euro-currency-exchange)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c3cc51c16239c5ce9cd94f1dba61a46ac176d918e97bf3eb77fcf38fe55e9e61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61727469616e2f6575726f2d63757272656e63792d65786368616e67652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/martian/euro-currency-exchange)[![Total Downloads](https://camo.githubusercontent.com/fba03f61ebfff8936b0556e974274b32efc204b465768a12eb126b72c276038c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61727469616e2f6575726f2d63757272656e63792d65786368616e67652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/martian/euro-currency-exchange)[![GitHub Actions](https://github.com/hendurhance/euro-currency-exchange/actions/workflows/main.yml/badge.svg)](https://github.com/hendurhance/euro-currency-exchange/actions/workflows/main.yml/badge.svg)

This package provides a simple way to get the current exchange rate of the Euro against other currencies.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require martian/euro-currency-exchange
```

### Register Service Provider

[](#register-service-provider)

You can register the service provider in the `config/app.php` file:

```
// config/app.php

'providers' => [
    ...
    Martian\EuroCurrencyExchange\Providers\EuroCurrencyExchangeServiceProvider::class,
];
```

### Install Locally

[](#install-locally)

Open composer.json and add the following to the repositories section: Note: You have to copy the package to the `packages/martian` directory.

```
{
    // composer.json

    "require": {
        "martian/euro-currency-exchange": "@dev"
    },

    "repositories": [
        "local": {
            "type": "path",
            "url": "packages/martian/euro-currency-exchange",
            "options": {
                "symlink": true
            }
        }
    ]
}
```

Then run `composer update` to install the package.

### Publish Config

[](#publish-config)

You can publish the config file with:

```
php artisan vendor:publish --provider="Martian\EuroCurrencyExchange\Providers\EuroCurrencyExchangeServiceProvider" --tag="config"
```

### Endpoint

[](#endpoint)

The postman collection is available in the `postman` directory.

MethodEndpointQuery ParametersDescriptionGET/api/exchangeamount, toGet the exchange rate of the Euro against other currencies.The swagger documentation is available at `/docs` folder. Open the `index.html` file in your browser.

Usage
-----

[](#usage)

### Default Route (GET) \[/api/exchange?amount=100&amp;to=USD\]

[](#default-route-get-apiexchangeamount100tousd)

By default, the exchange endpoint is available at `/api/exchange`. You can change this by publishing the config file and changing the `route` key.

You might want to use `https://yourdomain.com/api/exchange?amount=100&to=USD` to get the exchange rate of 100 Euros to US Dollars.

### Custom Route

[](#custom-route)

You can also use a custom route by publishing the config file and changing the `route` key.

```
// config/euro-currency-exchange.php

return [
    'route' => 'your-custom-route',
];
```

### Custom Controller

[](#custom-controller)

You can also use the controller provided by this package by to create your own route. **Note: You need to set the `route_disabled` key to `true` in the config file to disable the default route, after publishing the config file.**

```
// routes/api.php

use Martian\EuroCurrencyExchange\Http\Controllers\EuroCurrencyExchangeController;

Route::get('your-custom-route', EuroCurrencyExchangeController::class);
```

### Custom Response

[](#custom-response)

You can also use the Builder provided by this package to create your own response from your controller.

```
// app/Http/Controllers/YourCustomController.php

use Martian\EuroCurrencyExchange\Classes\Builder;

class YourCustomController extends Controller
{
    public function __invoke(Request $request)
    {
        $builder = new Builder($request->amount, $request->to);

        // Do something with the builder, check the provided methods in the Builder class.
        return response()->json([
            'amount' => $builder->getAmount(),
            'from' => $builder->getCurrency(),
            'to' => $builder->getConvertedCurrency(),
            'rate' => $builder->getRate(),
            'converted' => $builder->getConvertedAmount(),
        ]);
    }
}
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Josiah Endurance](https://github.com/martian)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1104d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1a2a17381645674b6254cd41641c17218986676b167821631faec6d0fd7f664?d=identicon)[hendurhance](/maintainers/hendurhance)

---

Top Contributors

[![hendurhance](https://avatars.githubusercontent.com/u/50846992?v=4)](https://github.com/hendurhance "hendurhance (3 commits)")

---

Tags

martianeuro-currency-exchange

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/martian-euro-currency-exchange/health.svg)

```
[![Health](https://phpackages.com/badges/martian-euro-currency-exchange/health.svg)](https://phpackages.com/packages/martian-euro-currency-exchange)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

89164.9k1](/packages/pulkitjalan-ip-geolocation)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
