genealabs/laravel-nova-morph-many-to-one
A Laravel Nova field that adds polymorphic many-to-one relationship support, letting you attach and manage morph-related models directly within Nova resource forms and detail views.
morphMany relation from a Nova detail screen, instead of forcing editors to re-create records inline. That unlocks workflows like "attach an existing document/media asset/comment thread to this parent record," which stock Nova relationship fields don't handle well for polymorphic relations.Adopt only if all of these hold:
morphMany relation exists where child records pre-exist and are legitimately shared across parents. If every child is created for exactly one parent, create-inline is the correct UX and this adds nothing.Look elsewhere — or decline — if any of these hold:
belongsToMany/morphToMany. Model it correctly rather than bending a morphMany into many-to-one semantics.Treat the version as pinned-permanently-until-forked. Because it's pre-1.0 and now frozen, there's no upgrade path to plan for — only a fork to maintain.
For executives: A small, free (MIT), internal-only admin capability that lets ops staff attach existing records instead of re-keying duplicates — better data quality, faster admin tasks, no customer-facing surface. Adopting it costs roughly a day of engineering and carries near-zero runtime risk, because it's a Nova field on internal screens rather than anything in the request path of the product. The caveat, stated plainly: the upstream project is archived, has essentially no adoption (2 stars, 0 dependents), and will never support Laravel 12. The recommendation is therefore not "add a dependency" but "borrow the source and own it" — vendor the field into our codebase, keep our own copy, add our own tests. That turns a dead dependency into a small owned utility, removes the framework-upgrade risk entirely, and still delivers the admin workflow this quarter. It should not be treated as a strategic or long-lived third-party dependency, and it should not appear on the roadmap as a feature.
For engineering: It's a Nova field plus Eloquent glue that renders morphMany as a searchable many-to-one selector on create and update forms. Before touching the main app: read the source (it's small), and if you install it at all, diff the composer.json constraint to confirm 0.4.0 widened illuminate/* rather than replaced it, and check the minimum PHP against our runtime. Then copy the field and trait into our app, write tests around attach, detach, and search behaviour, and drop the composer requirement. Two compatibility axes matter and only one is covered by the Laravel version number — Nova itself is closed-source, so pin and test against our specific Nova version explicitly. If we ever do install it, pin exactly and disable auto-merge on the dependency bot; under 0.x semver, every routine bump is a potential breaking change requiring human review.
How can I help you explore Laravel packages today?