Answer the question
In order to leave comments, you need to log in
How in yii in the rules of the config to make sure that the id is set in the link?
Good afternoon,
There is such a rule in the rules:
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
...
'url' => Yii::app()->createUrl('/product/all',array('id'=>1))
...
Answer the question
In order to leave comments, you need to log in
Remove the rule completely, and you will have a link /product/all/id/1 .
With your rule, /product(controller)/all(action)/1(id) is generated, which matches the rule
'//' - controller/action/ id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question