UPGRADE CRUD from GII

How to output data to GRIDVIEW data from a linked table.

Model

    public function rules()
    {
        return [
            [['serial_nomer', 'nomer_fstek', 'nomer_skzi','naimenovanie'], 'string'],
            [['seti', 'podrazdelenie', 'platforma'], 'integer'],
            [['seti'], 'exist', 'skipOnError' => true, 'targetClass' => Seti::class, 'targetAttribute' => ['seti' => 'id']],
            [['platforma'], 'exist', 'skipOnError' => true, 'targetClass' => Platforma::class, 'targetAttribute' => ['platforma' => 'id']],
            [['podrazdelenie'], 'exist', 'skipOnError' => true, 'targetClass' => Podrazdelenie::class, 'targetAttribute' => ['podrazdelenie' => 'id']],
        ];
    }

Table

    <?= GridView::widget([
        'dataProvider' => $dataProvider, - 
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
            'naimenovanie:ntext',
            'seti',
            'serial_nomer',
            'nomer_fstek',
            'nomer_skzi',
            'podrazdelenie',
            'adres',
            'platforma',
           [
                'class' => ActionColumn::className(),
                'urlCreator' => function ($action, Vipnet $model, $key, $index, $column) {
                    return Url::toRoute([$action, 'id' => $model->id]);
                 }
            ],
        ],
    ]); ?>

bd

I want to output “adres” from the “podrazdelenie” table to the main table.

Did you add a relation in the model?
If it’s declared as getXyz you can access the relation like this:

'columns' => [
...
xyz.adres,
...
],

https://www.yiiframework.com/doc/guide/2.0/en/db-active-record#declaring-relations