I'm using laradock
and I can access the page in browser http://localhost:8088/api/getakicks/get
without any problems.
But when I try to access it in controller I'm getting this error:
GuzzleHttp \ Exception \ ConnectException cURL error 7: Failed to connect to localhost port 8088: Connection refused
The code I use:
$client = new \GuzzleHttp\Client();
// Set various headers on a request
$client->request('GET', 'http://localhost:8088/api/getakicks/get');