Closed Anticom closed 5 years ago
This issue board is for tracking bugs, not general development questions. Please direct general questions to #nova on Laravel's Discord or #nova on the Larachat Slack Channel.
Well in the first place it was meant to be a feature request. Where do those belong?
General description I need a polymorphic relationship model similar to what Doctrine is capable of with their inheritance mapping.
Feature request / solution A possible solution might be the ability to embed a
morphOne
relation into my morphable entity in the same view in terms of CRUD operation. Nova could merge their attributes for viewing and updating the models and perform creation and deletion simulatniously on both.Background I'm trying to build a Nova backend which also has to deal with events during a fair. The event however can be of different types: a talk at a stage, a workshop, a product presentation etc. With Doctrine I would have an
Event
model andStageTalk
,Workshop
inherited from that one. However with Eloquent I can only do morphed relationships so the event entity would be completly disjoined from the workshop for example. This makes a very unpleasant and confusing way to add a new Event of a certain type.If you have any other ideas what the "laravel-way" of doing this would be please let me know.