From 89dfa4b1680a7ea5e31353c94d0df0c92457d66e Mon Sep 17 00:00:00 2001 From: Dan Soppelsa Date: Thu, 17 Jan 2019 23:55:02 -0500 Subject: [PATCH] Update readme --- readme.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index b361e20..c9f003f 100644 --- a/readme.md +++ b/readme.md @@ -83,12 +83,20 @@ class BioFormatter Callables can also replace entire table configurations allowing full control over what data is scrubbed and how. -``` +```php + function ($faker, $recordToScrub) { + 'users' => function ($faker, $user) { + $firstName = $faker->firstName; + $lastName = $faker->lastName; + return [ - 'value' => $recordToScrub['type'] == 'flat' ? $faker->numberBetween(1, 15) : $faker->numberBetween(25, 50)/100, - ] + 'first_name' => $firstName, + 'last_name' => $lastName, + 'email' => $firstName . "." . $lastName. "@" . $faker->safeEmailDomain, + 'phone' => substr($user['phone'], 0, 3) . "-555-" . $faker->randomNumber(4) + ]; }, ]; ```