OKyJIucT
9/29/2015 - 8:26 PM

GridView

GridView

<?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            [
                'label' => 'name',
                'format' => 'raw',
                'value' => function ($data) {
                    return Html::a($data->name, ['view', 'id' => $data->id]);
                },
            ],
            'token',
            'comment:ntext',
            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
    
    
    
    // поиск по логам https://nix-tips.ru/yii2-sortirovka-i-filtr-gridview-po-svyazannym-i-vychislyaemym-polyam.html