Search code examples
phpyiiyii2yii2-basic-app

Yii2:: cant acess to module from url


im used CRUD for generate module template. Activate module on config file web.php.

'admin' => [
            'class' => 'app\modules\admin\AdminModule',
        ],

and after can't to access: http://blog/web/index.php?r=admin


Solution

  • I'm solved this. I added module activation code on modules $config froperty web.php file.

    $config = [
        'id' => 'basic',
        'basePath' => dirname(__DIR__),
        'bootstrap' => ['log'],
        'modules' => [
            'admin' => [
                'class' => 'app\modules\admin\admin',
            ],
        ],