Im using an API, and I need to display the data in my blade view. Im having trouble doing that. This is what I have in my controller:
public function index() {
// secret ....
// key....
$configuration = Configuration::apiKey($apiKey, $apiSecret);
$client = Client::create($configuration);
$BTCSellPrice = $client->getSellPrice('BTC-USD');
dd($BTCSellPrice);
return view('welcome', compact(
'BTCSellPrice'
));
}
I get back this:
I tried calling it in the front-end these ways:
But keep on getting errors, like:
Cannot use object of type Coinbase\Wallet\Value\Money as array
Do I need to pass it through a collection or something?
via David