kirschbaum-development/nova-inline-relationship
Laravel Nova field for creating related resources inline without leaving the form. Search and select existing records, or open a modal to add a new one. Supports BelongsTo, MorphTo, and HasOne relationships, with searchable selects, custom modal forms, and automatic parent refresh.
Text::make(..., fn () => $this->relation->attr) closures, this is a refactor, not a new capability — with a clean success metric: no hand-rolled inline-field closures left in the codebase.Consider it when:
composer.json constraint before committing; the last release predates widespread Nova 5 deployment, so treat Nova 5 as untested until the field renders in a browser).resolveUsing closures.$timestamps on the related model when saving inline) was a data-integrity fix, not cosmetics. Budget for reading each changelog manually rather than letting composer update decide.$with or indexQuery eager loading. Ten rows looks fine; five hundred rows is a latency ticket.Look elsewhere when:
To executives: This is a small, reversible addition to our internal admin tooling that removes repeated click-throughs for the operations team. It is a composer dependency plus a few lines of resource code — hours of work, not a sprint — and it addresses a recurring "the admin is slow to use" complaint without taking engineers off customer-facing priorities. Cost is near zero; downside is contained because removal is a refactor, not a migration.
To engineering: Ship it in two phases. Phase one is read-only inline display of related attributes on index views — near-zero risk and where most teams should stop. Phase two is inline editing, which converts an index table into a write surface; that phase gets its own review covering validation, related-model policy authorization, audit trail, accidental-edit risk, and side effects from model events and updated_at. Wrap the package field in our own class (RelatedAttribute::make(...)) so a Nova major upgrade, upstream stall, or swap to a fork is a one-file change instead of a sweep across a dozen resources. Declare eager loading on every resource that uses it and prove it with a query-count test — N+1 is the default failure mode and development hides it. Pin ^2.1.1 (2.1.0 mishandled $timestamps on inline saves — a write-path integrity bug in an admin surface), and add tests covering null relations, populated relations, and a $timestamps = false child so a future dependency bump cannot quietly undo the fix. Nova majors are the maintenance cliff and the package's semver will not warn us; keep the wrapper and treat a fork as a realistic fallback rather than a last resort. Record the semantics in our Nova style guide: this field may write to the related model — verify policy and timestamp behaviour before using it.
How can I help you explore Laravel packages today?