Answer the question
In order to leave comments, you need to log in
How to build a RESTful API to work with data in related tables?
Can you please tell me how to build work with data from different tables?
Reading is clear, there is nothing complicated here. But what about the record, i.e. POST, PUT?
For example, content with multiple languages.
The question is entirely related to Yii2.
I have two assumptions:
1. Create an action in which to parse the data that came in and shuffle it into different models.
2. Create api requests for each model (table).
Please advise.
Answer the question
In order to leave comments, you need to log in
Good afternoon, Stanislav Tarasenko Rest means manipulations with entities. If your content (as I understand it, for example, an article) contains several languages, then this entity is one, therefore, it should be edited through one API point
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question