batch insert yii2 code example
Example: activerecord batch insert in yii2
Yii::$app->db
->createCommand()
->batchInsert('table_name', ['column1','column2', 'column3','column4','column5'],$data)
->execute();
Yii::$app->db
->createCommand()
->batchInsert('table_name', ['column1','column2', 'column3','column4','column5'],$data)
->execute();