Answer the question
In order to leave comments, you need to log in
Yii2 REST how to return result from 2 tables?
Hello. I have so far 3 tables - user, userInfo and posts with data for login / profile / and user posts, respectively. When requesting GET api.ru/user, I need to return some of the information from user and userInfo. That is to mix 2 fields from one table to another. How can I do that? After all, with find ()-> all () I get a ready-made array, is it really possible to manually loop through and manually drag fields from another table?
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