Answer the question
In order to leave comments, you need to log in
Why doesn't urlManager work correctly with modules?
There is a module: panel
There is such a link:
And these rules:
Url::to(['panel/order', 'slug' => $service->code])
'panel/order/<slug:\w+>/' => 'panel/order',
'panel/order/<slug:\w+>' => 'panel/order',
site.ru/panel/order/slug - все ОК работает.
http://site.ru/panel/panel/order?slug=queue-qwe
namespace app\modules\panel\controllers;
public function actionIndex($slug)
{
$service_model = Services::find()->where(['code' => $slug])->one();
return $this->render('index', compact('service_model'));
}
<?= Url::to(['/../panel/order', 'slug' => $service->code]) ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question