Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Nova Morph Many To One

Laravel Nova Morph Many To One Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Drop-in package that adds a many-to-one (inverse of one-to-many) polymorphic relationship to Eloquent and Nova.

Frequently asked questions about Laravel Nova Morph Many To One
What does genealabs/laravel-nova-morph-many-to-one do?
It adds a MorphManyOne relationship field to Laravel Nova and the inverse of a one-to-many polymorphic relationship to Eloquent. It lets you attach a single related model from a Nova resource form and manages the morph type and ID columns. The package is at version 0.4.0 and is intended as a drop-in Nova field.
Which Laravel and Nova versions are supported?
The available release evidence calls out Laravel 11 compatibility in version 0.4.0; earlier 0.x releases targeted earlier Laravel versions. The package is a Nova field, so you need a compatible Nova installation as well. Check the composer.json constraints before upgrading, because the notes do not confirm whether Laravel 9 and 10 remain supported.
How do I install it with Composer?
Install it through Composer in your Laravel application, typically with composer require genealabs/laravel-nova-morph-many-to-one. Because it is a Nova field package, you then reference the field class in your Nova resource. Confirm the exact namespace and field options against the package README, since those API details are not included in the supplied notes.
How is this different from Nova's built-in MorphTo or MorphMany fields?
Nova's MorphTo typically handles the child side of a polymorphic relation, while MorphMany handles a collection of related models. This package targets the inverse many-to-one case: one model belongs to a single parent through morph type and ID columns, and you edit that single association in the form. It is meant to remove the manual handling of morph columns.
How do I define the relationship on my Eloquent models?
You define a morph many-to-one relationship on the model that owns the morph type and ID columns, pointing at the parent model. Use the package's relationship support so the field can resolve and persist the association. The exact method name and signature should be taken from the README, as the supplied context does not include code samples.
What database columns does it expect?
A polymorphic many-to-one association relies on a morph type column and a morph ID column on the model's table. The package handles those columns when displaying and saving the field in Nova. The column names should match your relationship definition; verify naming conventions in the README before migrating.
Can I use it to attach one related model from a Nova resource form?
Yes. The field is designed to let you attach a single related model through the morph many-to-one association without leaving the Nova resource form. It displays and edits the association while managing the underlying morph values. This is the main use case described for the package.
Is version 0.4.0 stable for production?
It is pre-1.0, so under semantic versioning there is no public API stability guarantee and minor releases may include breaking changes. The 0.4.0 release adds Laravel 11 compatibility, but a single release note does not establish a maintenance cadence or support window. Treat production adoption as a risk assessment: pin the version, review changes, and test upgrades.
Does it support Laravel 12?
The supplied evidence only confirms Laravel 11 compatibility in 0.4.0. Laravel 12 support is not established by the release note and should be confirmed with the maintainer or by checking current composer constraints. If you need Laravel 12, verify it before planning adoption.
What should I check before adopting it in a production Laravel app?
Verify the composer.json illuminate constraints to see whether Laravel 9 and 10 are still supported and whether the Laravel 11 change was a widening or a replacement. Check the minimum PHP version, the transitive dependency surface, and whether CI actually runs tests against Laravel 11. Also assess maintainer activity, upgrade guidance, and the bus factor, since the package is pre-1.0.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource