- What is martinjuul/many-to-many?
- It is a Laravel Nova field package that provides a custom form control for many-to-many relationships, covering both polymorphic and non-polymorphic relations. It plugs into a Nova resource's fields() method and does not modify your models, migrations, or pivot tables. The underlying relation definition and pivot schema stay entirely in your application.
- How do I install martinjuul/many-to-many?
- Install it with Composer via composer require martinjuul/many-to-many, then add the field to the fields() array of the Nova resource that owns the relationship. Because it is a Nova field, the package only does anything inside a Nova admin panel, so a valid Nova license and installation are prerequisites. Review the field class and service provider before installing, since the package is small and largely unaudited.
- Which Laravel Nova versions does this package support?
- This is not confirmed by the package description, so check the laravel/nova constraint in its composer.json and any CI configuration before adopting it. Nova major releases change the field and asset lifecycle, and an unmaintained field can appear fine at install time and then misbehave after a Nova upgrade. Pin both the package version and laravel/nova in lockstep rather than accepting a floating constraint.
- Does it support pivot columns, custom pivot models, and pivot attributes?
- Pivot support is not documented in the available description, so treat it as unverified until you read the source or test it. The common real-world need is many-to-many with pivot data such as a role level or an is_owner flag, plus pivot actions in the form. If the field only performs bare attach and detach, it will look fine in a demo and fall short in production.
- Does the field work with morphToMany relationships?
- The package description explicitly states that it handles both polymorphic and non-polymorphic many-to-many relationships, so morphToMany is intended to be supported. Verify this against your own morph map and pivot table naming before relying on it, since polymorphic relations add type columns that field implementations sometimes mishandle. A staging Nova instance with realistic data is the fastest way to confirm.
- Does martinjuul/many-to-many respect Nova relationship authorization?
- It is not confirmed whether the field honors Nova's attachAny, attach, detach, and update policy methods or the canSee and canSeeWhen helpers. If it does not, the field becomes a permissions hole rather than a UX improvement, letting editors modify relations they should not touch. Test with a restricted user account in staging before exposing it to real editors.
- Is the option list searchable and paginated for large relations?
- The implementation details are unknown, so check whether the field materializes every related model or uses a searchable, paginated select. Tag and category pivots frequently reach tens of thousands of rows, and a fully rendered option list will stall the Nova form at that scale. If the list is unpaginated, limit the relation with a constrained query or choose a different field.
- Can I test this package without a paid Nova license?
- No, Laravel Nova is closed-source and license-gated, so the field cannot be exercised without a licensed Nova installation. That is also the structural reason many small Nova fields ship without meaningful automated tests, and why public CI coverage is unlikely. Plan to validate behavior yourself in a staging Nova environment pinned to your production Nova version.
- How does it differ from Nova's built-in BelongsToMany field?
- The available description does not state a concrete differentiator, so compare the source against what Nova's built-in BelongsToMany field already provides for your Nova version. If the only difference is visual, the built-in field is usually the safer choice because it tracks Nova releases automatically. Adopt the package only if it demonstrably handles polymorphic relations or pivot workflows that the built-in field does not.
- Is martinjuul/many-to-many actively maintained and safe for production?
- There is no visible evidence of recent maintenance: the repository has no stars, no dependents, a single maintainer, and no issue traffic. The realistic risk is quiet abandonment, which surfaces as breakage at the next Nova upgrade rather than at install. Pin to a tagged release or commit hash, read the source, and keep the field isolated to specific resources so it can be reverted with a one-line change if needed.