Skip to content

Instantly share code, notes, and snippets.

@fzaninotto
Created October 24, 2011 09:58
Show Gist options
  • Save fzaninotto/1308697 to your computer and use it in GitHub Desktop.
Save fzaninotto/1308697 to your computer and use it in GitHub Desktop.
Inserting data to several tables using Faker Populator and Propel
<?php
$faker = \Faker\Factory::create();
$populator = new \Faker\ORM\Propel\Populator($faker);
$populator->addEntity('Author', 10000);
$populator->addEntity('Book', 100000);
$populator->addEntity('Review', 1000000);
$insertedPKs = $populator->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment