Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDeShaun Jones
1,759 PointsUsing Wrapper library
I have composer installed locally in my project directory. However when I follow along with the tutorial for step (User.php) <?php
require DIR . '/vendor/autoload.php'
use Milo\Github;
$api = new Github\Api;
$url = 'https://api.github.com/users/treehouse'; $response = $api->get($url); $user = $api->decode($response); echo '<img src="' . $user->avatar_url . '" />';
The avatar image does not show. When I inspect the code nothing is returned. Am I doing something wrong?
2 Answers
richporter
16,727 PointsAs far as I can see, you are simply missing a semi colon after the require statement.
DeShaun Jones
1,759 PointsThank you for the find.