PHP code example of mrgoodbytes8667 / faker-providers
1. Go to this page and download the library: Download mrgoodbytes8667/faker-providers 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/ */
mrgoodbytes8667 / faker-providers example snippets
use Bytes\Common\Faker\Factory;
$faker = Factory::create();
$faker->camelWords();
$faker->snakeWords();
$faker->oneOrMoreOf(['some', 'iterable', 'object']);
$faker->rangeBetween(4, 1, 2);
$faker->randomAlphanumericString();
$faker->paragraphsMinimumChars();
public function process(ContainerBuilder $container): void
{
$container->getDefinition('.zenstruck_foundry.faker')->setFactory([\Bytes\Common\Faker\Factory::class, 'create']);
}