Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
function faker($property = null)
{
$faker = Faker\Factory::create();
if ($property) {
return $faker->{$property};
}
return $faker;
}
// Usage:
faker()->name;
faker()->year();
faker('safeEmail');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment