LaravelDaily / QuickAdminPanel-Issues-Ideas-Discussions

Repository for discussing everything around QuickAdminPanel: https://quickadminpanel.com
4 stars 0 forks source link

Support Polymorphic Relationships #4

Open PovilasKorop opened 5 years ago

PovilasKorop commented 5 years ago

A few customers requested this feature. Specifically, one example from email:

Hey there, I found your website and twitter and just singed up for quick admin panel. In most of my apps I need polymorphic one-many or polymorphic many-many relationships between cruds. Nested comments on articles being one example as in my schema attached. How can I recreate MorphTo, MorphMany, MorphedByMany?

https://laravel.com/docs/master/eloquent-relationships#one-to-many-polymorphic-relations https://laravel.com/docs/master/eloquent-relationships#many-to-many-polymorphic-relations https://laravel.com/docs/master/eloquent-relationships#custom-polymorphic-types

unnamed


Status: currently not planned anytime soon, because it's a very big feature for us, with only small amount of customers actually requesting it. So for now it's not our focus.

Saying that, if you want to build polymorphic relationships manually, maybe my video tutorial will help: Eloquent Polymorphic Relations: Properly Explained

connecteev commented 4 years ago

+1 on this..adds real value, and is (somewhat?) part of / related to pivot tables?

PovilasKorop commented 4 years ago

@connecteev as mentioned in the post, currently not in plans. And it's not about pivot tables, although Polymorphic have their own many-to-many: https://www.itsolutionstuff.com/post/laravel-many-to-many-polymorphic-relationship-tutorialexample.html