Open jarekkozak opened 9 years ago
When you generate controller for CRUD operations in default controller folder (namespace) i.e. frontapp/controllers everything is ok. But if you generate in sub-namespace i.e. "frontend/controllers/db" wrong url is created for update operation.
[ 'class' => 'yii\grid\ActionColumn', 'buttons' => [ 'update' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-pencil"></span>', Yii::$app->urlManager->createUrl(['organization/view', 'id' => $model->id, 'edit' => 't']), [ 'title' => Yii::t('yii', 'Edit'), ]); } ], ], ],
if you change line
- Yii::$app->urlManager->createUrl(['organization/view', + Yii::$app->urlManager->createUrl([Yii::$app->controller->id.'/view',
works ok.
regards, Jarek
If you're still using the module you need to add the following:
When you generate controller for CRUD operations in default controller folder (namespace) i.e. frontapp/controllers everything is ok. But if you generate in sub-namespace i.e. "frontend/controllers/db" wrong url is created for update operation.
if you change line
works ok.
regards, Jarek