I have setup Yii2 nested module and I want to set different configuration and each modules has own component and other settings with there own models
Like in School Management System, I have created a nested module like V1 is my API (main module) and under these, I have created a Student module, Teacher module, Parent module, driver module, admin module each has a different table and different model. I want to login differently with each user like..
API calls for each
https://example.com/v1/admin/login
https://example.com/v1/student/login
https://example.com/v1/parent/login
https://example.com/v1/user/login
https://example.com/v1/driver/login
How can I manage these login and their own configuration?
Thanks
Jitendra

In the module Class you can set components, aliases and other settings and using something like this:
Here is an example for the admin module:
or if you prefer you can set the components like this
if you are using nested modules, you are already specifying "settings" for the module - i.e all sub modules
To use different login for all modules when specifying components set different name for the
identityCookieof the user component for each module.Example for admin module: