Creating Database

Earlier we performed CRUD operation with yii's Gii generating tool. Now we'll perform CRUD without Gii.

We'll perform a complete CRUD operation here.

The name of our Yii2 folder is dbb.

We have created a database named student and a table inside it named child.

YII Creating database 1

Look at the above snapshot, this is our table's structure.

# Database Configuration

To configure your database in Yii2, go to common/config/main-local.php file and write the name of your database.

We have written student as the name of our database.