这是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'] ],
问题是无论我如何修改网址,它都会继续附加我在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' => [
]
]
],
答案 0 :(得分:0)
您是否尝试过使用yii\helpers\Url?
use yii\helpers\Url;
Url::toRoute(['listing/particular'])