make get request laravel code example
Example 1: laravel 6 make http request
$client = new GuzzleHttp\Client();
$res = $client->get('https://api.github.com/user', ['auth' => ['user', 'pass']]);
echo $res->getStatusCode(); // 200
echo $res->getBody(); // { "type": "User", ....
Example 2: laravel http client
composer require guzzlehttp/guzzle
Example 3: laravel http client
use Illuminate\Support\Facades\Http;
$response = Http::get('http://test.com');