title: Yii2 role management with rbac and database storage
body: <p>I want to learn Yii2 membership and use Yii to store and retrieve roles using a database.</p>
  
  <p>I have read <a href="http://www.yiiframework.com/doc-2.0/guide-security-authorization.html" rel="nofollow noreferrer">Security Authorization</a> and <a href="https://stackoverflow.com/questions/21308423/how-to-add-role-to-user-yii2">How to add role to user?</a> and <a href="http://www.yiiframework.com/forum/index.php/topic/49104-does-anyone-have-a-working-example-of-rbac/" rel="nofollow noreferrer">Does Anyone Have A Working Example Of Rbac?</a> and also try using the <a href="http://www.yiiframework.com/extension/yii2-admin" rel="nofollow noreferrer">yii2-admin</a> extension and tried to understand how Yii manages user roles but I can't find any working samples or simple step by step examples.</p>
  
  <p>Please guide me and tell me the simplest solution.</p>