What is the rule in UrlManager in Yii1 to add the rules list to have eaten a few get parameters in the method?

Good day,

Did as here: www.elisdn.ru/blog/15/dtogglecolumn-kolonka-perekl...

There is a method actionToggle($id, $attribute) controller Services

When you click on a radio button in the grid - generates this Url:

salon/smanager/services/toggle/7&attribute=exist

But I catch:

Error 400
Incorrect query.


If you change actionToggle($id, $attribute) on actionToggle($id)

And enter:

salon/smanager/services/toggle/7

The id sticky, but I need to cling both.

The rules in the UrlManager:

'/' => 'site/index',
 '<action:(login|logout|registration)>' => 'users/<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>',
 /** The Manager */
 '<module:smanager>' => '<module>/services/index',
 '<module:smanager>/<controller:\w+>/<id:\d+>' => '<module>/<controller>/view',
 '<module:smanager>/<controller:\w+>' => '<module>/<controller>/index',
 '<module:smanager>/<controller:\w+>/<action:\w+>/<id:\d+>' => '<module>/<controller>/<action>',
 '<module:smanager>/<controller:\w+>/<action:\w+>' = > '<module>/<controller>/<action>',</action></controller></module></action:\w+></controller:\w+></module:smanager></action></controller></module></id:\d+></action:\w+></controller:\w+></module:smanager></controller></module></controller:\w+></module:smanager></controller></module></id:\d+></controller:\w+></module:smanager></module></module:smanager></action></controller></action:\w+></controller:\w+></action></controller></id:\d+></action:\w+></controller:\w+></controller></id:\d+></controller:\w+></action></action:(contact)></action></action:(login|logout|registration)>


What you need to do in order to be considered included in the method get parameters?
July 12th 19 at 17:00
1 answer
July 12th 19 at 17:02
Try to replace the salon/smanager/services/toggle/7&attribute=exist on salon/smanager/services/toggle/7?attribute name=exist. You indicate that ID is an integer, and in the second case, the framework takes the value 7&attribute=exist as a whole, and the number of turns 7. And the second argument is not.

Find more questions by tags Yii