Skip to content

How to use Laravel 9 Factory on package Models? #384

Answered by cmgmyr
AleksandrovC asked this question in Q&A
Discussion options

You must be logged in to vote

Hi and thanks for using the package!

Unfortunately, the package isn't currently set up for Laravel 8+ factories. This would be a great addition but I would want this to be included with some other updates and a major version bump.

In the meantime, a workaround would be to create your own models and extend each one from the package. Remember to update the config file too. In your own models, you can now use the HasFactory trait, then go ahead and make your factory classes.

I hope that helps.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cmgmyr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants