Hello everyone! I added a custom namespace to the Yii2.0basic, such as: Commonservice, which has a class test.php in the folder, Controllers's testcontroller.php to its reference, found that after running always prompt cannot be found, should be a custom namespace is not loaded by the framework, so do not know, then how to load the custom namespace in basic? In advanced, you should set the alias in commonconfigbootstrap.php, how do you set the alias in basic? Thank you!
Reply content:
Hello everyone! I added a custom namespace to the Yii2.0basic, such as: Commonservice, which has a class test.php in the folder, Controllers's testcontroller.php to its reference, found that after running always prompt cannot be found, should be a custom namespace is not loaded by the framework, so do not know, then how to load the custom namespace in basic? In advanced, you should set the alias in commonconfigbootstrap.php, how do you set the alias in basic? Thank you!