Download the PHP package martian/euro-currency-exchange without Composer
On this page you can find all versions of the php package martian/euro-currency-exchange. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download martian/euro-currency-exchange
More information about martian/euro-currency-exchange
Files in martian/euro-currency-exchange
Package euro-currency-exchange
Short Description A Laravel package for converting euro to other currency
License MIT
Homepage https://github.com/hendurhance/euro-currency-exchange
Informations about the package euro-currency-exchange
Euro Currency Exchange
This package provides a simple way to get the current exchange rate of the Euro against other currencies.
Installation
You can install the package via composer:
Register Service Provider
You can register the service provider in the config/app.php
file:
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.
Then run composer update
to install the package.
Publish Config
You can publish the config file with:
Endpoint
The postman collection is available in the postman
directory.
Method | Endpoint | Query Parameters | Description |
---|---|---|---|
GET | /api/exchange | amount, to | Get 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
Default Route (GET) [/api/exchange?amount=100&to=USD]
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
You can also use a custom route by publishing the config file and changing the route
key.
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.
Custom Response
You can also use the Builder provided by this package to create your own response from your controller.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.