Skip to content

Commit

Permalink
chore(docs): converter blade usage
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorAvelar committed Oct 13, 2022
1 parent 4aa77a1 commit 9fd03d3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,26 @@ In your dashboard view you use the `livewire:dashboard-exchange-rates-tile` comp
</x-dashboard>
```

#### Fetching exchange rates

In `app\Console\Kernel.php` you should schedule the `Avelar\ExchangeRates\UpdateCurrencyExchangeRatesCommand` to run.
In your dashboard view you use the `livewire:dashboard-exchange-converter-tile` component.

If you are using fixer.io free tier, you are limited to max. 100 requests / day. This means you will only be able to query the API
~15 min. to have consistent updates 24 hours.
```html
<x-dashboard>
<livewire:exchange-converter-tile position="a1" />
</x-dashboard>
```

#### Fetching exchange rates

If you are using a premium tier then you can adapt the scheduled interval to run more frequently.
In `app\Console\Kernel.php` you should schedule the `Avelar\ExchangeRates\UpdateCurrencyExchangeRatesCommand` to run.

```php
// in app/console/Kernel.php

protected function schedule(Schedule $schedule)
{
// ...
$schedule->command(Avelar\ExchangeRates\UpdateCurrencyExchangeRatesCommand::class)->everyFifteenMinutes();
$schedule->command(Avelar\ExchangeRates\UpdateCurrencyExchangeRatesCommand::class)->everyMinute();
}

```
Expand Down

0 comments on commit 9fd03d3

Please sign in to comment.