Skip to content

Instantly share code, notes, and snippets.

@stuarthannig
Created August 18, 2015 16:53
Show Gist options
  • Select an option

  • Save stuarthannig/d56f4bddf0b4c641a94c to your computer and use it in GitHub Desktop.

Select an option

Save stuarthannig/d56f4bddf0b4c641a94c to your computer and use it in GitHub Desktop.

Revisions

  1. stuarthannig created this gist Aug 18, 2015.
    7 changes: 7 additions & 0 deletions routes.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    <?php
    # Install Guzzle by running `composer require guzzlehttp/guzzle`
    Route::get('github/{username}', function ($username) {
    $client = new GuzzleHttp\Client();
    $request = $client->get("https://api.github.com/users/{$username}");
    echo $request->getBody();
    });