L
L
lsa4132015-12-09 08:14:15
Yii
lsa413, 2015-12-09 08:14:15

Module not connecting in Yii2?

Hello!
With the help of gii I generate the blog module, I try to connect it in the config and for some reason yii does not see it point-blank. I add code:

$config = [
...
'modules' => [
        'blog' => [
            'class' => 'app\modules\blog\Module',
        ],
    ],
...
];

in config\web.php, but when you click on the link index.php?r=blog/default/index nothing happens.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lander, 2015-12-09
@usdglander

Maybe you have a CNC configured and you need to knock on the host.ru/blog/default/index module ?
upd: Is there a directory with the module itself? Sometimes gii can't write files if there are no permissions.

D
Dmitry Baibukhtin, 2015-12-09
@PiloTeZ

Try
site.ru/index.php/blog/default/index
site.ru/blog/default/index

  • Check the namespace of the module's main class
  • Check for files
  • Check folder names

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question