How to set the default controller in yii2
Like few people already said, you need to add defaultRoute
in the configurations file.
Here is how it should look:
//config/web.php
in basic template or backend/config/main.php
in advanced
$config = [
...
'components' => [
...
],
'params' => $params,
'defaultRoute' => 'user/index',
];
Did you try in your config:
'defaultRoute' => 'user/index'
Default Controller