S
S
Sergey Beloventsev2016-05-20 14:48:19
Yii
Sergey Beloventsev, 2016-05-20 14:48:19

How to implement urlmanager rule?

here is the structure module(serial) controller(category)action(oneserial). made such a rule.
'serial/<id:\w+>'=>'serial/category/oneserial'
I'm trying to write a link

<?= Yii::$app->UrlManager->createUrl(['serial/category/oneserial','id'=>$car->name_serial]) ?>

I get this address
http://film.lc/serial/category/oneserial?id=Перевозчик+(сериал)

serial/Перевозчик+(сериал)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kim, 2016-05-20
@kimono

<module>/<id:\d+

>' => '<module(:serial)>/<controler(:category)>/<action(:oneserial:
\w+)>
Correct this and try again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question