M
M
Michael2016-09-14 15:44:28
Yii
Michael, 2016-09-14 15:44:28

How to insert basic data into the database in Yii2?

You need to enter the initial data into the database. There are migrations in yii, but they are more for structural changes.
There is an idea to create a controller and a component in a console application. What are the ways of implementation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2016-09-14
@springimport

Still, Yii 2.0 migrations have methods for inserting data, for example

$this->insert(...);
$this->batchInsert(...);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question