Answer the question
In order to leave comments, you need to log in
How to generate url with id at the end in Yii?
Hello,
Why is this code:
Yii::app()->createUrl('/product/item', array('id', $item->CODE))
'rules'=>array(
'<action:(login|logout)>' => 'user/<action>',
'<action:(contact)>' => 'site/<action>',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'<module:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>' => '<module>/<controller>/<action>/<id>',
'<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
),
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