Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dansoppelsa committed Jan 18, 2019
1 parent 9d106af commit 89dfa4b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,20 @@ class BioFormatter

Callables can also replace entire table configurations allowing full control over what data is scrubbed and how.

```
```php
<?php

return [
'coupons' => 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)
];
},
];
```

0 comments on commit 89dfa4b

Please sign in to comment.