Dbmanager And No Save()

Hello,

I am trying to use DbManager.

Followed tutorials without success:

    $auth = Yii::$app->authManager;


    $auth->createRole("admin","Administrator");


    $auth->save();

but only get this result:

Calling unknown method: yii\rbac\DbManager::save()

Any ideas?

Dennis

why save()? read it https://github.com/yiisoft/yii2/blob/master/docs/guide/security-authorization.md#building-authorization-data

Thanks for your response.

I was using tutorial from this link http://denzyii.blogspot.com/2014/04/implementing-rbac-in-your-yii2.html which was not working.

The link you provided shows much more detail.

    $admin = $auth->createRole('admin');


    $auth->add($admin);

I made updates based on your link and its now working.

Many thanks.