0

这是 gridview 的列之一。这是它给我的网址http://localhost/testing/apps/web/op/details/listing/particular

我想要的网址是

http://localhost/testing/apps/modules/op/controllers/listing/particular

我试过了

'formOptions' => [ 'action' => ['/listing/particular'] ],

'formOptions' => [ 'action' => ['../listing/particular'] ],

'formOptions' => [ 'action' => ['apps/modules/op/controllers/listing/particular'] ],

问题是无论我如何修改 URL,它只会追加我在后面输入的任何内容。http://localhost/testing/apps/web/(what i type) 无论如何要删除这个web东西吗?

[
        'class'=>'\kartik\grid\EditableColumn',
        'attribute'=>'particular',
       'editableOptions' =>
        [
            'inputType' => Editable::INPUT_TEXT,
            'formOptions' => [ 'action' => ['listing/particular'] ],
            'options' => [

            ]
        ]
    ],
4

1 回答 1

0

你试过使用yii\helpers\Url吗?

use yii\helpers\Url;
Url::toRoute(['listing/particular'])
于 2017-08-16T20:12:16.590 回答