$factory->create(User::class);
$factory->times(10)->create(Beer::class);
/* This will generate 10 persisted beers with fake values */
$user = $factory->create(
User::class,
[
'username' => 'BadassAdmin'
'active' => true
]
);
$post = $factory->make(User::class)
Maybe you don't want an instance of the entity, but need some fake data to create you entity object. The values
method will return an array of fake values for an entity.
$productData = $factory->values(User::class);