/** * @param $idSKu * @return \Dingo\Api\Http\Response */ public function getDetailsPage($idSKu) { $product = $this->integrator->getDetailPage($idSKu); if (!$product) { throw new StoreResourceFailedException('Product not found'); } return Response()->json($product); }
/** * @param Request $request * @return \Symfony\Component\HttpFoundation\Response */ public function getFeaturedProducts(Request $request) { try { $products = $this->integrator->getFeatureds($request); return Response()->json($products); } catch (\Exception $e) { throw new StoreResourceFailedException($e->getMessage()); } }