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
Nova Nested Form

Nova Nested Form Laravel Package

yassi/nova-nested-form

A Laravel Nova field that embeds nested relationship forms directly inside a parent resource form, letting you create and edit related models inline without leaving the page. It simplifies complex data entry by keeping nested forms and validation within the main Nova workflow.

View on GitHub
Deep Wiki
Context7

Nova Nested Form lets you manage related Eloquent models directly inside a parent Laravel Nova resource form—no separate screens or modals required. Add a NestedForm field to edit hasOne, hasMany, and morphMany relationships inline, with full support for validation, conditional fields, and Nova's native field types.

  • Inline create, edit, and delete of child records
  • Works with hasOne, hasMany, and morphMany relations
  • Full validation and authorization support
  • Compatible with most Nova field types and layouts
  • Configurable headers, labels, and collapse behavior
Frequently asked questions about Nova Nested Form
What does the yassi/nova-nested-form package actually do?
It adds a Laravel Nova field called NestedForm that embeds relationship forms directly inside a parent resource form, so you can create, edit and delete hasOne, hasMany and morphMany children without separate screens or modals. It ships as a single Nova field class plus a Vue 2 component that hooks Nova's resolve() and fillAttributeFromRequest() lifecycle. Nothing is added to the customer-facing request path, so the blast radius stays on the admin surface.
How do I install and configure nova-nested-form?
Install it with composer require yassi/nova-nested-form, then add the NestedForm field to the fields() method of the parent Nova resource and point it at the relationship. Installation itself is quick; the real effort is configuration and defensive hardening. Budget a one to two day spike on a throwaway branch with a single canonical use case before you commit to it.
Which Laravel Nova versions does this field support?
It is built for Nova 3, and its Vue 2 component will not mount on Nova 4 or 5. Because the last release was May 2021, treat a Nova major upgrade as a hard stop rather than a warning. The failure mode is often silent: the field renders nothing, the form submits without the nested key, and the save appears successful while deleting every child.
Which relationship types can I nest inside a parent form?
hasOne, hasMany and morphMany are supported. It fits poorly where the relation is pivot-heavy or where pivot attributes are first-class data, and BelongsToMany support is weak. In practice the nesting depth ceiling is about two levels.
Why are my child records being deleted when I save the parent form?
The field uses destroy-on-omit semantics: any child omitted from the submitted payload is deleted on save, with no confirmation and no soft delete unless you add one. A JavaScript error, a conditionally hidden row or a truncated payload can therefore turn an admin edit into silent data loss. Add soft deletes on the child table, a deleting observer for audit, and HTTP-level feature tests before going live.
Does it support validation and conditional fields on nested rows?
Yes, validation rules on nested fields run as part of the parent form submission, and conditional fields plus most native Nova field types work inside the nested rows. Child-row error messages can be opaque, so test the failure paths explicitly. File uploads inside nested rows are also known to be fragile.
Are child model policies and authorization enforced for nested records?
Not by default. A user who can edit the parent can typically create and delete children regardless of the child model's own policy. If per-child authorization matters, enforce it explicitly in model events or at the field layer, and write a test that proves the 403. Decide up front who is accountable if a parent-authorized, child-unauthorized user deletes rows through this form.
How do I keep nested child rows in a stable order?
There is no reliable ordering out of the box, so add an explicit position column to the child table and manage it yourself. It is also worth eager loading children through $with on the parent resource to avoid N+1 queries on the edit screen. Both items belong on the standard hardening checklist alongside soft deletes and transactions.
Is saving nested children wrapped in a database transaction?
No. N child writes happen inside one admin request with no all-or-nothing guarantee, so a partial save can leave the parent in an inconsistent state. Wrap the save in a transaction at the middleware or model layer. This is one of the first things to add during the hardening phase and should be covered by a feature test.
Is nova-nested-form still maintained, and what are the alternatives?
It is effectively a single-maintainer package with its last release in May 2021 and no credible security-response path, so treat adoption as 'spike, then budget a fork' rather than a passively consumed dependency. Name an owner for the fork and budget their time for the next Nova major. Alternatives are writing your own Nova field or a repeat-style component with explicit relation handling, and if your admin roadmap is mostly flat CRUD, the ownership cost probably is not worth it.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections