Answer the question
In order to leave comments, you need to log in
What pattern to use to return data from API?
There is a code in which I receive the data. What is the best way to form it?
$messages = $this->propositionChatService->getMessagesByProposition($proposition);
return new JsonResponse([
'messages' => $messages
]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question