handleListing( $this->responsePrepareService, $page, $limit, $news_category, ); } #[Route('/mainNews', name: 'mainNews', methods: ['GET'])] public function mainNews(): JsonResponse { return new JsonResponse($this->responsePrepareService->bornMainNews()); } #[Route('/search', name: 'searchNews', methods: ['GET'])] public function search(): JsonResponse { return new JsonResponse( $this->responsePrepareService->bornDetailMainNews() ); } #[Route('/{detailId}', name: 'oneNews', methods: ['GET'])] public function oneNews( #[MapQueryParameter] string $detailId = null ): JsonResponse { return $this->handleDetailElement( $this->responsePrepareService, $detailId, ); } }