R
R
ramazan222018-06-25 12:11:20
Yii
ramazan22, 2018-06-25 12:11:20

Yii2 outputting data from linked pages?

There are 3 tables:
Profile - with a column - id
Skill-dictionary - id, skill Profile_skill -
id, id_profile,
id_skill in Skill-dictionary It is necessary to display the skill value from Skill-dictionary in the view profile (for the corresponding id profile) Help, please. Really needed! If, in addition to the request, you need to change $dataProvider, then also tell me how. Now it's like this: public function actionIndex() { $dataProvider = new ActiveDataProvider([ 'query' => Profile::find(),
]);
return $this->render('index', [
'dataProvider' => $dataProvider,
]);
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mykola, 2018-06-25
@iSensetivity

So you need to enter in the list or in the view profile?
Anyway, pseudocode:

[
'attribute' => 'skills',
'value' => function($model) {
return join(', ', ArrayHelper::map($model->skills, 'id', 'skill'));
}
],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question