Closed jeremyworboys closed 9 years ago
This will never happen because of the fact that attribute generation could be dependent on the state of the User model, for example, the generation of relationships.
@GrahamCampbell I think he means before we even call ->create
Yeh, I know, but that will cause many issues.
In 3.0, you do have access to the generator factory though: https://github.com/thephpleague/factory-muffin/blob/30e9b3b821e29bec30315079ab717e49eedad748/src/FactoryMuffin.php#L548.
Yeah i guess, and if he really needs it, a simple work around is:
$fm->define('User', array(
'username' => Faker::firstNameMale()
));
$user = $fm->instance('User');
// $user->toArray(): array('username' => 'Jack')
Yeh.
I'm thinking something like:
I'm happy to write a pull request for this, I just want to get some feedback before I put any time into it.