/** * @return \Symfony\Component\HttpFoundation\Response */ public function getTree() { try { $categories = $this->integrator->getTree(); return Response()->json($categories); } catch (\Exception $e) { throw new StoreResourceFailedException($e->getMessage()); } }
/** * @return \Symfony\Component\HttpFoundation\Response */ public function getWhoBougthAlsoBougth(Request $request) { try { $recommendations = $this->integrator->getWhoViewAlsoView($request); return Response()->json($recommendations); } catch (\Exception $e) { throw new StoreResourceFailedException($e->getMessage()); } }