on a module I have add a component named db where i put, like the main Yii component, the data for database connection, I need in my module use everytime the db specified in his configuration for all models and not the main database connection, how I can do this?
相关问题
- how multiple row delete using checkbox in yii2
- what a part does bower/bower-asset play in php app
- how to get post value from multiple array in yii2
- Yii2 GridView with ArrrayDataProvider search
- Session expiring in Yii2 despite user activity
相关文章
- Can you run console jobs from yii2-basic?
- How to do a bulk database insert in Yii2?
- How to send mail to multiple recipients in Yii2 ma
- Yii2 - check if the user is logged in view
- Render html in yii2 Gridview Widget
- Yii2 - How do I AutoLoad a custom class?
- YII2 gridview sort sum of values of two columns
- Yii2 - DetailView widget float left
You have several way eg. using a separated configuration in app/config/main.php eg adding a specific dbMyMod to component config
or one way that not require a static configuration in app/confing
could be based on a module function that return a proper db connection
then in you module you can retrive the module db connection
.