Javatpoint Logo

How to create and add Rules to the db in DbManager rbac?

By: icecre*** On: Fri Mar 02 07:58:54 IST 2018     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
Hi,

I want create and add a Rule in {{%auth_rule}} table of my db in yii2 app.

I can't find any document or guide for do this operation in yii2. but i found addRule($rule) method in yii\rbac\DbManager and i think, i should use this method for do this but i don't know how?

Whether i should create a class for any Rules in @app\rbac or this method just used for PhpManager?
Up0Down