Last active
September 18, 2017 17:35
-
-
Save mostafa6765/146a261640047c3bf23928c68abaa528 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? php | |
public function index() | |
{ | |
$url = 'https://api.github.com/repos/code4mk/dev'; | |
$http = new \GuzzleHttp\Client(['verify' => false]); | |
$json = $http->get($url, ['timeout' => 30])->getBody()->getContents(); | |
$posts = $json; | |
$tests = json_decode($posts); | |
return view('home')->withTests($tests); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment