Collections & MorphOne polymorphic pivot table #508
GeorgeFourkas
started this conversation in
Ideas
Replies: 2 comments
-
Sure, as long as they can be done in a non breaking way. v4 is already in the works so, I can't introduce any breaking changes right now. |
Beta Was this translation helpful? Give feedback.
0 replies
-
i dont think that there will be any breaking changes, the collections features will add a new method in the CuratorPicker class, which adds 2 new methods, that will be usable in the filament component like the others, and the next feature just change the return type of getRelationship() method and accepts a new MorphOne relationship just outside the if($component->multiple()) statement |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I was wondering would you accept a PR that adds 2 new features to this awesome package?
Collections: The first feature would be similar to spatie/laravel-medialibrary collections functionality. It would work only when using morphable relationships, It includes a new column in the media_items table called 'collection' and some methods to the component so that it can fetch the appropriate media based on the collection
MorphOne Relationship: The second feature would be to support morphOne relationship using a morphable table. Currently while using the package i was able to use only the morphMany relationship and that requires ->multiple() method to be chained. So When we have an occasion where we use a polymorphic table and we need a single media to be loaded, it is not possible to achieve this functionality.
If you are willing to accept a PR like that i could develop these features.
Beta Was this translation helpful? Give feedback.
All reactions