$this->planService->index($request->validated()), __('message.fetched') ); } /** * 활성 요금제 목록 (공개용) */ public function active(): JsonResponse { return ApiResponse::handle( fn () => $this->planService->active(), __('message.fetched') ); } /** * 요금제 등록 */ public function store(PlanStoreRequest $request): JsonResponse { return ApiResponse::handle( fn () => $this->planService->store($request->validated()), __('message.created') ); } /** * 요금제 상세 */ public function show(int $id): JsonResponse { return ApiResponse::handle( fn () => $this->planService->show($id), __('message.fetched') ); } /** * 요금제 수정 */ public function update(PlanUpdateRequest $request, int $id): JsonResponse { return ApiResponse::handle( fn () => $this->planService->update($id, $request->validated()), __('message.updated') ); } /** * 요금제 삭제 */ public function destroy(int $id): JsonResponse { return ApiResponse::handle( fn () => $this->planService->destroy($id), __('message.deleted') ); } /** * 요금제 활성/비활성 토글 */ public function toggle(int $id): JsonResponse { return ApiResponse::handle( fn () => $this->planService->toggle($id), __('message.updated') ); } }