Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
forecho committed Sep 24, 2015
1 parent c4406fa commit de5bf65
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,21 @@ Usage

Once the extension is installed, simply modify your application configuration as follows:

Run

```
php yii migrate --migrationPath=@yii/rbac/migrations/
```

```php
return [
'modules' => [
'rbac' => [
'class' => 'yiier\rbac\Module',
// 'allowNamespaces' => [
// 'yiier\rbac\controllers',
// 'api\controllers'
// 'api\controllers',
// 'api\modules\user\controllers',
// ],
// 'menus' => [
// 'users' => 'User'
Expand Down Expand Up @@ -71,8 +78,12 @@ echo Menu::widget(
'icon' => 'fa-dashboard',
'active' => Yii::$app->request->url === Yii::$app->homeUrl
],
\Yii::$app->getModule('rbac')->getInstance()->getItems()
\Yii::$app->getModule('rbac')->getInstance()->getItems() // add menu
]
]
);
```
```

> [Get√Yii](http://www.getyii.com)
<i>Web development has never been so fun!</i>
[www.getyii.com](http://www.getyii.com)

0 comments on commit de5bf65

Please sign in to comment.