public function product_details() { $best_buy_key = \App\AppConfig::where('key', 'best_buy_api_key')->first(); $id = Input::get('id'); $bClient = new \GuzzleHttp\Client(); $response = $bClient->request('GET', 'http://api.bestbuy.com/v1/products(productId=' . $id . ')?apiKey=' . $best_buy_key->value . '&format=json')->getBody(); return view('main.product-detail')->with('product', json_decode($response, true)['products'][0]); }