Implement currency exchange rate API.

This commit is contained in:
James Cole
2018-06-28 07:32:58 +02:00
parent cfd98a33fe
commit f55d4e32c0
12 changed files with 255 additions and 17 deletions

View File

@@ -50,7 +50,7 @@ class ExchangeController extends Controller
$rate = $repository->getExchangeRate($fromCurrency, $toCurrency, $date);
if (null === $rate->id) {
if (null === $rate) {
Log::debug(sprintf('No cached exchange rate in database for %s to %s on %s', $fromCurrency->code, $toCurrency->code, $date->format('Y-m-d')));
// create service: