Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Create Faker when a Factory is created #34298

Merged
merged 1 commit into from
Sep 11, 2020
Merged

Conversation

browner12
Copy link
Contributor

when we create a new Factory object, let's resolve the Faker instance and assign it to the local $faker property.

this allows us to access it everywhere in the Factory, including states, without the need for a closure.

when we create a new Factory object, let's resolve the Faker instance and assign it to the local `$faker` property.

this allows us to access it everywhere in the Factory, including states, without the need for a closure.
@taylorotwell taylorotwell merged commit 3af5110 into laravel:8.x Sep 11, 2020
@browner12 browner12 deleted the faker branch September 11, 2020 23:02
@GrahamCampbell GrahamCampbell changed the title [8.x] create Faker when a Factory is created [8.x] Create Faker when a Factory is created Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants