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 |
What is the directory structure of yii2?
How we can remove index.php from url in yii?
What are the system requirements to install yii2?
How do you proceed when you have to use yii for any application?
What are the server requirements to install yii2?
How to set default controller on yii project ?
How to get current controller id in yii ?
What is cmodel class in yii2?
How to include a view file in another view file yii?
What are the advantages of yii2?
What is cformmodel in yii framework ?
How to customizing helper classes in yii framework?