Changing the faker locale when using a factory #41200
Unanswered
jansgescheit
asked this question in
Ideas
Replies: 1 comment
-
You can use states as you said. Maybe you can add a argument to your custom state and customize it in the factory? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I just stumbled across it while seeding. It would be nice if it could match the locale of the faker instance to a factory method.
Of course I can create a new faker in the definition. Maybe I could override it in a state too.
But something like this would be cool:
Post::factory()->faker('de')->create(4)
Beta Was this translation helpful? Give feedback.
All reactions