2 years ago

Factory, first iteration

Posted 2 years ago by lukaisailovic

I've created factory for User model and it works fine generating random users. I was wondering is there a way to do something at creation but for one specific user. What I mean is that I'm creating username with $faker->userName and I'm creating 5 users. What i'd like to do is create that 5 (or any number) of users where one would have username johndoe for example and others would have random names. How would you guys do it ?

Please sign in or create an account to participate in this conversation.