You can use Guzzle:
Install it:
composer require guzzle/guzzle ~3.0
Create a client setting the base URL:
$client = new GuzzleServiceClient('http://api.github.com/users/');
Get your response:
$response = $client->get("users/$username")->send();
And display it:
dd($response);
But if you are trying to follow the MVC pattern, you should not do this directly in your controller, so create a service class, you call from your controller or your repositories, to do this work for you.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…