yokai/many-to-many-matrix-bundle
Symfony bundle that displays many-to-many relations as an editable matrix grid, letting admins toggle associations in bulk from a single screen. Configure entities, fields, and labels to manage complex mappings without custom forms. Ideal for admin panels.
ManyToMany relation as a checkbox grid and syncs the collection back on submit. It is a data point for scoping that work — the feature is roughly "one custom form type plus a small JS/template layer," which lands in days, not sprints.belongsToMany and a Blade/Livewire grid. Treat the assessment as a data point on the problem, not the artifact.Consider it (rarely, and as reference material) when:
assignedAt, weight, isPrimary).FormType into Doctrine's collection sync (by_reference => false, adder/remover conventions) rather than a maintained library.Look elsewhere — or build in-house — when:
getBlockPrefix/configureOptions migration, Twig API changes, or Doctrine's collection-handling updates without a fork.ManyToOne associations, and the matrix becomes a custom form over that entity — the package's core assumption breaks.To executives (one paragraph): We evaluated a small open-source package that renders many-to-many associations as a checkbox matrix in admin screens. It is not a viable dependency — it's a Symfony-only bundle, last released in 2016, with no adoption and no maintenance. It does, however, validate that this class of admin screen is a component, not a project: the equivalent for our stack is a few days of work. Recommendation: do not adopt; budget the internal component if the matrix pattern appears in the roadmap three or more times. Net cost of doing nothing is per-screen custom code; net risk of adopting is an unmaintained fork with no upstream security response.
To engineering (one paragraph): yokai/many-to-many-matrix-bundle is a Symfony form type that maps a ManyToMany to a checkbox grid and syncs the owning collection on submit. It is a useful 200-line reference for the by_reference => false + adder/remover pattern and for how to shape the grid template — read it, don't require it. Build our own: a reusable MatrixType over Eloquent belongsToMany (or Doctrine, if that's the stack), parameterized by row/column query, with explicit support for pivot-attribute entities and pagination/virtualized columns for large cardinalities. Ship it as a shared UI package so every future admin matrix is configuration, not code.
How can I help you explore Laravel packages today?