handle($id); return $this->jsonSuccess(['resources' => $resources]); } /** * @Get("/{id:[0-9]+}/info", name="api.chapter.info") */ public function infoAction($id) { $service = new ChapterInfoService(); $chapter = $service->handle($id); return $this->jsonSuccess(['chapter' => $chapter]); } /** * @Post("/{id:[0-9]+}/like", name="api.chapter.like") */ public function likeAction($id) { $service = new ChapterLikeService(); $service->handle($id); return $this->jsonSuccess(); } /** * @Post("/{id:[0-9]+}/learning", name="api.chapter.learning") */ public function learningAction($id) { $service = new ChapterLearningService(); $service->handle($id); return $this->jsonSuccess(); } }