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

Filament Relation Manager Component Laravel Package

njxqlus/filament-relation-manager-component

Use Filament Relation Managers anywhere in your app, not just on resource pages. Drop them into forms, schema components, or tabs with a simple RelationManager component, control lazy loading, and optionally publish the package views.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is a thin adapter layer, not a framework: it exposes Njxqlus\Filament\Components\Forms\RelationManager and ...\Infolists\RelationManager, both fluent (->manager(Class::class)->lazy(bool)) schema components that let an existing Filament RelationManager class be mounted anywhere a schema slot exists — Tabs, form schemas, infolists, custom layouts.
  • For a codebase already standardized on Filament, this fills a genuine gap in the upstream API (Relation Managers are otherwise bound to resource page registration slots). Fit is highest for admin/back-office products where the same related-record table is needed in multiple contexts without duplicating RelationManager subclasses.
  • It deliberately reuses unmodified RelationManager classes, so it composes with existing authorization, table configuration, and action definitions rather than introducing a parallel abstraction. That is the right architectural trade-off and keeps blast radius small.

Integration feasibility

  • High. composer require njxqlus/filament-relation-manager-component, no migrations, no config file, no service provider wiring beyond package discovery. Views are optionally publishable via vendor:publish --tag="filament-relation-manager-component-views".
  • Adoption cost per usage is a few lines in an existing form()/infolist() schema. No data-model or routing changes.
  • Primary constraint is version alignment: the 1.x line tracks Filament v3, the 2.x line tracks Filament v4/v5. Confirm the exact Filament minor your app pins before selecting a branch.

Technical risk

  • Coupling to non-public Filament internals. The component must resolve and inject the owner record, hydrate the Livewire parent context, and drive the RelationManager's table lifecycle outside its native page. Filament does not contract these APIs. Evidence of fragility is in the changelog: 2.0.0 was a namespace/dependency rework for Filament 4, 2.0.1 was "Filament v4 fixes," 2.1.0 fixed ownerRecord assignment for modal/slideover contexts. Expect a break-or-fix cycle on every Filament major, and occasionally on minors.
  • Nested Livewire component risk. A RelationManager is a Livewire component; embedding it inside a Filament form/infolist (itself Livewire) means nested component state, wire:key uniqueness, and multiple-instance isolation on the same page must be validated. This is the highest-probability source of subtle UI defects (table state bleeding between tabs, pagination/search state collisions).
  • Authorization semantics. Mounting a RelationManager outside a resource page may bypass page-level gating (canViewAny, canAccess, resource policy checks) that normally guards the relation manager slot. Table-level and action-level policies still apply, but the outer guard is now your schema's responsibility. This needs explicit review before any form-based (mutating) usage.
  • Supply chain and bus factor. 46 stars, 0 dependents, effectively a single maintainer (njxqlus) with four occasional contributors and laravel-shift bot PRs for Laravel 13 compatibility. Low popularity means low field-testing, but the surface area is small (~2 component classes plus views) and MIT-licensed, so forking or vendoring is a realistic fallback measured in hours, not weeks.
  • Release hygiene signal. Changelog and release notes exist and Dependabot/CI workflows are active — positive. But note the 2.2.2 date (2026-06-24) and mixed compatibility PRs landing on both 1.x and 2.x branches, which suggests maintenance is reactive rather than a planned support matrix.

Key questions

  1. Which Filament major/minor are we on, and does the maintainer publish an explicit compatibility matrix (Filament 3.x / 4.x / 5.x × Laravel 10–13 × PHP version)?
  2. Does the embedded RelationManager respect our resource policies and tenant scoping when mounted outside a resource page — specifically canViewAny, canCreate, canAttach, and multi-tenancy ownerRecord resolution?
  3. What happens with lazy loading disabled across N tabs on a single page — how many queries and how much HTML ship on first paint?
  4. Are create/edit/attach/detach modals and slideovers fully functional when nested (the 2.1.0 fix suggests this was broken for a release)? Do file uploads and repeater state survive nested submits?
  5. Is getOwnerRecord() derived from the enclosing form's record, and what is the behavior on CreateRecord pages where no persisted owner exists yet?
  6. If we must fork, how large is the diff to reimplement? (Ask engineering to timebox a spike.)
  7. Do we publish views or consume them as shipped? Publishing pins us to internal markup that will drift on Filament upgrades.

Integration Approach

Stack fit

  • Natural fit only if the product is already a Filament admin panel. If Filament is used incidentally (one internal tool), the marginal value of relocating Relation Managers is low relative to the upgrade-coupling cost.
  • Highest-value target: dense detail views where related records are currently exposed as separate resource pages, separate tabs on the resource, or as bespoke read-only tables. The README's Versions / Stands / Contexts tab pattern is exactly the shape to look for.

Migration path

  • Non-destructive and incremental. Existing RelationManager classes are consumed unchanged, so the migration is purely additive at the schema level. There is no data migration, no route change, and no deprecation of the current relation manager registration — you can run both paths side by side.
  • Recommended first cut: move one read-only infolist tab onto the package, leaving the resource page's native relation manager registration in place. This gives a direct A/B on rendering, query count, and policy behavior with zero rollback cost.

Compatibility

  • Pin the package to the branch matching your Filament major (^1.1 for Filament 3, ^2.2 for Filament 4/5) and lock it in composer.json with an explicit constraint rather than a floating range. Add a CI job that resolves the package against your pinned Filament version so a routine composer update cannot silently drag in a breaking combination.
  • Confirm PHP and Laravel constraints from composer.json in the repo directly — the release notes claim Laravel 13 compatibility but do not state a PHP floor.

Sequencing

  1. Spike (0.5–1 day): one engineer reproduces the README tab example against a real RelationManager from our codebase, in an infolist first. Success criteria: correct records, correct policy enforcement, correct pagination/search inside the tab.
  2. Read-only rollout (1–2 days): convert 2–3 infolist tabs. Default lazy(true) and measure. No mutations yet.
  3. Mutation validation (2–3 days): one form-context tab with create/edit/attach actions, exercising modals, slideovers, and validation. This is where the nested-Livewire and ownerRecord risks surface.
  4. Standardize: document the pattern, add a lint/PR-checklist item, decide publish-vs-consume for views, and record the fork contingency.
  5. Defer any usage on CreateRecord pages until question 5 is answered — owner-record semantics are least well-defined there.

Operational Impact

Maintenance

  • Steady-state cost is low: no runtime services, no schema, no background jobs. The real cost is a Filament upgrade tax — budget a half-day of validation per Filament major upgrade, and a bug-triage window per minor if the package lags. Historically the maintainer has shipped fixes within a release or two, but that is best-effort, not committed.
  • Dependabot churn on the dependency tree is the maintainer's problem, not ours; our exposure is limited to the resolved version.
  • If views are published, they become our code: they will silently diverge from upstream markup on Filament upgrades and must be re-diffed manually. Default recommendation: do not publish unless a concrete styling requirement demands it.

Support

  • Community-only, GitHub-issues-based, no SLA, no commercial backing. Acceptable for internal admin tooling; a poor fit for anything customer-facing or revenue-critical on the critical path.
  • Mitigation: vendor or fork under our org with a documented patch process. Given MIT licensing and a ~2-class surface, this is cheap insurance and should be treated as the default contingency rather than an emergency measure.

Scaling

  • Each embedded component instantiates a full RelationManager with its own table query. On a page with many tabs, lazy(false) multiplies first-paint query count and HTML payload roughly linearly — this is the main scaling hazard, and it is entirely configurable on our side.
  • Default every instance to lazy(true); treat lazy(false) as an explicit, justified exception (e.g., a single tab where the extra round-trip is user-visible).
  • Watch for per-instance query duplication when the same relation is mounted in more than one container on one page — cache at the relation-manager level if this shows up in profiling.
  • Concurrency/scale risk is negligible: it is a UI composition layer, not a data path.

Failure modes

  • Silent breakage after a Filament upgrade — table renders but actions/modals throw, or owner record resolves to null. Symptom class: 500s on modal open, empty tables, records scoped to the wrong parent. Detect via an integration test that mounts one component and asserts a row count.
  • Authorization gap — an embedded manager renders without the resource-page guard, allowing an actor to view or mutate related records they should not. Highest-severity failure mode; must be covered by a policy test, not manual QA.
  • Nested Livewire state bleed — pagination/search/sort from one tab affecting another, or modal state lost on submit. Detect via a browser test with two instances on one page.
  • Lazy-load dead zones — a tab that never hydrates (JS error, Livewire asset mismatch) presenting as an empty table. Add a smoke assertion on initial tab activation.
  • Abandonment — no commits for a Filament major cycle, leaving us pinned to an EOL Filament. Tripwire: if the package has no release within 60 days of a Filament major, execute the fork plan.

Ramp-up

  • Near-zero for anyone already fluent in Filament schema composition: the API is two methods on a component, and the README example is directly copy-pasteable. Estimate 1–2 hours to first working tab for a mid-level Laravel dev.
  • The non-obvious learning is not the package API but the surrounding context: how owner records are inferred, where policy checks now live, and lazy-loading trade-offs. Budget the majority of onboarding time there, and capture it in an internal pattern doc.
  • Net TPM read: low-cost, high-leverage ergonomics win for a Filament-heavy admin surface, with the primary risk being upgrade coupling and authorization semantics rather than technical feasibility. Worth a timeboxed spike; gate broader rollout on the policy and nested-mutation validations.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package