hide a id in url yii2 using urlManager

后端 未结 1 985
自闭症患者
自闭症患者 2021-01-26 14:20
\'//\'=>\'/\'

I have written this rule in url manager so th

1条回答
  •  迷失自我
    2021-01-26 15:08

    What you are trying to achieve is impossible and useless.

    Think about it logically. Action in this case simply won't know exactly what model should be loaded and updated.

    I see only one possible use case of that.

    When you load page post/update, then select post from list to update and load it with AJAX.

    In this case just remove id from action parameters, you don't need to write additional url rules for that.

    0 讨论(0)
提交回复
热议问题