I have these rules defined inside my url manager config:
'rules' => [ 'home/<id:\d+>/<slug>' => 'home/view', 'home/<id:\d+>/<ter>/<slug>' => 'home/view', ],
<ter> should be additional territory that I wan to use.
When I visit this url manually it works:
But inside my index view I need to build this url as a part of href in my links, but Url helper outputs me url like :
I am making url like this :
<a href="<?= Url::toRoute(['home/view', 'id' => $model->id, 'ter' => "fr", 'slug' => $model->title]) ?>">Some link </a>
What I am doing wrong ? Thanks