PHP code example of springbokagency / faker-xpdo-orm-adapter

1. Go to this page and download the library: Download springbokagency/faker-xpdo-orm-adapter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

springbokagency / faker-xpdo-orm-adapter example snippets



$generator = \Faker\Factory::create();
$populator = new \SpringbokAgency\Faker\ORM\xPDO\Populator($generator, $xpdo);
$populator->addEntity(\MODX\Revolution\modUser::class, 5);
$populator->addEntity(\MODX\Revolution\modResource::class, 10);
$insertedPKs = $populator->execute();