hsharghi/nestablecollection
NestableCollection is a Laravel package that extends collections for working with nested, hierarchical data. Build trees, traverse parents and children, and manage nested sets with a familiar collection API, keeping your models and arrays organized.
Package posture: 1.1.20 is a minor, additive release that exposes a parentColumn('parent_column_name') configuration method, allowing models to declare a non-default parent foreign key for the package's self-referencing hierarchy relationship. No deprecations or removals are signaled.
parentColumn() hook is a conventional fluent configuration method and does not alter the package's architectural footprint.composer require plus a trait import and (now, optionally) one configuration call per model. Because 1.1.20 lets us map to an existing column name, models whose schemas use parent_uuid, parent_node_id, or similar legacy naming can now be onboarded without a migration — previously they would have required schema renaming or package forking.parent_id) is now implicit rather than enforced; teams that should call parentColumn() but don't may get silently null parent relationships rather than an error.parentColumn() participate correctly in each path?parentColumn('...') call during model bootstrapping rather than renaming database columns — this avoids a risky data migration and keeps the package aligned to our schema instead of the reverse.parentColumn() call even where the default applies, so intent is documented in code.^1.1 and review changelogs on upgrade; the primary maintenance cost is documenting the per-model parentColumn() convention in our internal model guidelines.parentColumn() yields empty parent relations with no exception; add a smoke test that asserts a known child resolves to its parent.parentColumn() values across models in the same domain graph complicate joins and reporting; standardize naming where feasible.belongsTo/hasMany with a configurable key." Budget roughly half a day for a developer to read the source, validate traversal behavior, and write the first integration tests.How can I help you explore Laravel packages today?