Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

yii2 gridview action change urls

<?= GridView::widget([
        ...
        'columns' => [
			...
            [
                'class' => 'yiigridActionColumn',
                'urlCreator' => function ($action, $model, $key, $index) {
                    return Url::toRoute(['controller/' . $action, 'id' => $model->id]);
                }
            ],
        ],
  ]) ?>
Source by www.yiiframework.com #
 
PREVIOUS NEXT
Tagged: #gridview #action #change #urls
ADD COMMENT
Topic
Name
9+1 =