Answer the question
In order to leave comments, you need to log in
How to display data in Yii2 in view?
Tell me how to display the necessary data in the View file.
You need to display for each record ( record_id ) its own amount , but when using this code: <?=$model->lid->amount?>
Only the first entered data is displayed, that is, for lider_id = 1, only 10 will be displayed.
What should be done?
Answer the question
In order to leave comments, you need to log in
It looks like you set the relation between models as hasOne, and you have hasMany there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question