Hi, to all. Am developing a rest api application using yii2 basic template. Am planning to have multiple apis for different sites and each site will be represented as a main module in the application and within it, I will have sub modules represented by api versioning as v1. My main issue is that I dont want to mess up with the working of the normal site but only override the web.php file in the main site config with one called api.php that has rest apis settings. Seems to be simple but can’t get my head around it. Please help to solve this issue.
public function init()
{
parent::init();
// initialize the module with the configuration loaded from config.php
\Yii::configure($this, require(__DIR__ . '/config.php'));
}