service->getByKanban($kanbanId); return $this->successResponse(payload: KanbanReplyResource::collection($replies)); } public function store(KanbanReplyRequest $request, int $kanbanId): JsonResponse { $reply = $this->service->create($kanbanId, auth()->id(), $request->validated()['reply']); return $this->successResponse(payload: new KanbanReplyResource($reply), message: __('messages.created'), code: 201); } public function update(KanbanReplyRequest $request, int $kanbanId, int $id): JsonResponse { $reply = $this->service->update($kanbanId, $id, $request->validated()['reply']); return $this->successResponse(payload: new KanbanReplyResource($reply), message: __('messages.updated')); } public function destroy(int $kanbanId, int $id): JsonResponse { $this->service->delete($kanbanId, $id); return $this->successResponse(message: __('messages.deleted'), code: 204); } }