Answer the question
In order to leave comments, you need to log in
How to correctly set a selection through a linked table in Yii2?
Let's say we have three tables:
public function getCurrency() {
...
}
public function getCurrency() {
$userCurrencyModel = UserCurrency::find()->where(['user_id' => $this->id])->one();
return $userCurrencyModel->currency;
}
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