How to connect to the database?
Answer / Smriti Chauhan
1. Configure your database connection in the `config/db.php` file.
2. In your application or module's configuration (`config/main.php` or `config/module.php`), ensure that 'components' => ['db'] is included, and specify the connection ID used in step 1.
| Is This Answer Correct ? | 0 Yes | 0 No |
How does yii compare with other frameworks?
What is difference between “render” and “renderpartial” in yii?
How to get current action id in yii ?
How to use datetimepicker in yii2?
What's new in yii release 2.0?
What is cformmodel in yii framework ?
How to use session in yii?
How we can set default controller in yii?
What is gii in yii 2.0?
How we can call layouts in controller file in yii?
What is the naming convention in yii framework? Explain
How to create directory structure of yii framework?