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

Version - User polymorphic relationship #73

Open
MartinPetricko opened this issue Apr 26, 2024 · 1 comment
Open

Version - User polymorphic relationship #73

MartinPetricko opened this issue Apr 26, 2024 · 1 comment
Labels
enhancement New feature or request todo 🗒️

Comments

@MartinPetricko
Copy link

First of all thanks for creating this package. Love how simple and useful it is! ❤️

I would like to propose a change in how version author is stored. At the moment there is no simple way to keep versions from multiple user models. Some applications can have multiple guards with different model providers, while sharing some of the resources. For example we can have Admin, User and both of them can edit an Article.

Would there be any problem with changing Version - User relationship from belongsTo to morphTo?

@overtrue
Copy link
Owner

Yes, indeed, the current version doesn't work for your scenario, but I can look into the next major version 6.x to support your scenario, and for now, you can consider modifying migrations + inheriting the default Version class to do so.

Thanks.

@overtrue overtrue added enhancement New feature or request todo 🗒️ labels Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request todo 🗒️
Projects
None yet
Development

No branches or pull requests

2 participants