Answer the question
In order to leave comments, you need to log in
Is it possible to display two IDs through one relations?
Is it possible to do this with one relay, or do I need to do two?
the user table has id fields, username
the game table has user1 and user2 fields where user IDs are stored,
it must be displayed in the grid through relaying, the question is whether this can be done through
public function getUser()
{
return $this->hasOne(User::className(), ['id' => 'user_id']);
}
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