There are 2 applications (frontend and backend). Now I need to add a few more and I want to put them in one folder to get this structure:

-components -console -environments -... -modules ----frontend ----backend ----common ----new_app1 ----... 

How best to implement this? Tried to make changes to Bootstrap.php:

 Yii::setAlias('frontend', dirname(dirname(__DIR__)) . '/modules/frontend'); 

But it did not help.

    1 answer 1

    If you need to break modules by modules you can do this:

    at config file :

     'modules' => [ 'api' => [ 'class' => 'app\modules\api\v1\module', ], 'admin' => [ 'class' => 'app\modules\admin\admin', ], ], 

    Made connection of two modules in Yii2

    Structure:

     -components -console -environments -... -modules ----api ----admin ----...