jeudi 2 novembre 2017

Accessing a URL stored in a variable from a controller

I am in a confusing situation

In my Laravel controller, I have a variable

public function storeName($key)
$store = new Store();
$storeName = $store->connectAPI($key);

This $storeName variable will actually give me a URL, which if accessed, will give me a JSON response.

If I die and dump $storeName variable it will print

http://ift.tt/2iVbqZc

But, what I actually want is to access this $storeName variable, by passing a GET request in my controller, so I can get a JSON response from this API call.

How can I access this URL in my controller?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2z7TJJX
via IFTTT

Aucun commentaire:

Enregistrer un commentaire