request('GET', $wp_endpoint); $content = $response->getBody(); $oContent = json_decode($content); $laravel_endpoint = 'https://github.com/laravel/laravel/releases/latest'; $client = new \GuzzleHttp\Client(); $response = $client->request('GET', $laravel_endpoint, [ 'allow_redirects' => false ]); $content = $response->getBody()->getContents(); $laravel_latest = substr($content, 84); $laravel_latest = substr($laravel_latest, 0, -31); $projects = Projects::orderBy('name')->get(); return view('status-checker.index', ['projects' => $projects, 'wp_latest' => $oContent->offers[0]->version, 'laravel_latest' => $laravel_latest]); } }