Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
norbybaru committed Jul 26, 2019
1 parent b03c482 commit b3fbfb8
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,44 @@
# Laravel Exchange Rate
Allows to convert money from one currency to another using latest exchange rate on market

## Installation

```php
$ composer install norbybaru/exchange-rate
```
Publish Config `config/exchange.php`
```php
$ php artisan vendor:publish --provider="NorbyBaru\ExchangeRate\ExchangeRateServiceProvider"
```

Run Migration
```php
$ php artisan migrate
```

## Usage
Update exchange rate to get latest rate on the market.
Run below command to get latest exchange rate

```php
$ php artisan rate:update
```

* Get Rate
```php
<?php
use NorbyBaru\ExchangeRate\Facades\Exchange;

$rate = Exchange::rate("USD");

```

* Convert Currency
```php
<?php

use NorbyBaru\ExchangeRate\Facades\Exchange;

$money = Exchange::convert(5000, 'USD', 'ZAR');

```

0 comments on commit b3fbfb8

Please sign in to comment.