amrshawky / laravel-currency

Laravel package for current and historical currency exchange rates & crypto exchange rates. based on the free API exchangerate.host

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I tried converting from USD to ETH but got a weird error

ebuka-odih opened this issue · comments

This is the function below

public function showRate()
{
$currency = Currency::convert()
->from('USD')
->to('ETH')
->source('crypto')
->withoutVerifying()
->get();
return floor($currency * $this->balance);
}

error: `A non-numeric value encountered`

The API does not support converting between fiat and crypto