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

Implement HasDomainFactory trait #42

Closed
1 task
jaspertey opened this issue Mar 23, 2024 Discussed in #30 · 0 comments · Fixed by #44
Closed
1 task

Implement HasDomainFactory trait #42

jaspertey opened this issue Mar 23, 2024 Discussed in #30 · 0 comments · Fixed by #44
Assignees

Comments

@jaspertey
Copy link
Member

Action item:

  • Refactor the current domain model factory implementation as a portable HasDomainFactory trait instead

Discussed in #30

Originally posted by meditto August 17, 2023
Hello, I hope you're all doing well. I've been using laravel-ddd for the past few days and have found it to be a valuable tool for my Laravel projects. I'd like to suggest a feature enhancement that I believe could further improve the package's usability.
The current process involves generating the BaseMdel. I believe this process could be simplified and made more user-friendly by introducing a new trait, HasDDDFactory.

The proposed HasDDDFactory trait would serve as a drop-in replacement for the existing HasFactory trait. It would automatically handle the detection of the appropriate factory path just like the BaseModel.

The flexibility of the HasDDDFactory trait could also extend to models that don't directly extend the Model object, such as the User model. This adaptability adds to its potential usefulness.

image

I would greatly appreciate your thoughts and insights on this proposal.

@jaspertey jaspertey self-assigned this Mar 23, 2024
@jaspertey jaspertey linked a pull request Mar 23, 2024 that will close this issue
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 a pull request may close this issue.

1 participant