myloveGy / yii2-admin

yii2 后台管理模块
BSD 3-Clause "New" or "Revised" License
35 stars 11 forks source link

jinxing\admin\Admin是不是打错了 #1

Closed abeaczg closed 6 years ago

abeaczg commented 6 years ago

1. return [ 'modules' => [ 'admin' => [ 'class' => 'jinxing\admin\Admin', 是不是应该改成jinxing\admin\Models ....

myloveGy commented 6 years ago
  1. 是写错啦,正确的配置是:

    return [
    'components' => [
        'modules' => [
            'admin' => [
                'class' => 'jinxing\admin\Module',
    
                // Make use of that kind of user
                'user' => 'admin'
            ]
        ],
        // authority management
        'authManager'  => [
            'class' => 'yii\rbac\DbManager',
        ],
        ...
    ],
    ]
  2. backend\controllers 里的控制器只有那么几个, 主要功能在 admin ( jinxing/yii2-admin 包) 这个模块里面 ,将主要的功能都放到包里面去了,通过配置模块使用。backend\controllers 里面的控制器,只是一个示例,怎么用 jinxing/yii2-admin; 将功能移动包里面,方便项目使用