Getting to Know the Laravel HTTP Client

4 years ago

mpociot

Example snippet using the new Laravel 7 HTTP client. The example code is coming from Laravel News.

Code

$response = Http::get('https://api.github.com/users/paulredmond/gists' );

// Array of data from the JSON response
$data = $response->json();
Video course: PHP Package Development