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] Allow dynamic factory methods to obey newFactory method on model #34492

Merged
merged 2 commits into from
Sep 24, 2020
Merged

[8.x] Allow dynamic factory methods to obey newFactory method on model #34492

merged 2 commits into from
Sep 24, 2020

Conversation

btaskew
Copy link
Contributor

@btaskew btaskew commented Sep 23, 2020

PR is for issue #34490

Benefit is that models that have to define a factory via the newFactory method can utilise the magic factory methods for has and for.

@taylorotwell
Copy link
Member

taylorotwell commented Sep 23, 2020

What if the class isn't using that trait? Should you check if the method exists first?

@taylorotwell taylorotwell merged commit 70a73ab into laravel:8.x Sep 24, 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