Yii2 Database Seeder

The Yii2 database seeder extension is now released!

Built with simplicity in mind, it brings you ability to fill your database with (mainly) Faker data by quickly configuring relations between the tables and columns of your tables and corresponding generators of fake data.

Have a look at how simple and straightforward the usage is:

$seeder = new \tebazil\yii2seeder\Seeder();

$generator = $seeder->getGeneratorConfigurator();

$faker = $generator->getFakerConfigurator();


    'id', //automatic pk

    'book_id', //automatic fk










You can locate the code above in a console command to call it when you need your test data to be refreshed.

Here is the Yii2 extension. The framework-agnostic database seeding library is also available.

You are welcome to comment on my work and suggest improvements.

Thanks for your attention.