简体   繁体   中英

Using different Path to the same controller in Yii

I have a yii-controller handling everything under

/controllername/list/type/{something}.

The same controller should be used under a different path

/admin/controllername/list/type/{something} 

because some rights are set differently.

How can I use the same controller in both instances under Yii?

Your second url format should be a different module, you can set access control filter in controller or use RBAC for different user instead of changing url format.

About Yii module http://www.yiiframework.com/doc-2.0/guide-structure-modules.html

Authorization http://www.yiiframework.com/doc-2.0/guide-security-authorization.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM