Allows populate fake data to your database
The best feature of this library is AutomaticPopulator which allows you to create fake data for one table based on its structure or column names.
Create file e.g. bin/command.php
as shown below (or add PopulatorCommand to existing Symfony console application):
$application = new Symfony\Component\Console\Application();
$populator = new Populator\Command\PopulatorCommand();
$populator->addDatabase(new Populator\Database\Database('db_name', 'mysql:dbname=db_name;host=db_host', 'db_user', 'db_password'));
$table1Populator = new Populator\Populator\AutomaticPopulator('table_1', 50);
$populator->addPopulator($table1Populator);
$application->add($populator);
$application->run();
This setup will populate 50 fake rows for database table with name table_1
after executing this command:
php bin/command.php populator:populate