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

Arbol Laravel Package

calvient/arbol

calvient/arbol is a Laravel package for managing hierarchical tree data in Eloquent models, with helpers for ancestors, descendants, nested sets, and ordered category structures. It simplifies building trees, querying relationships, and maintaining sorted node hierarchies.

View on GitHub
Deep Wiki
Context7

Simple Laravel Data Viz Tool

Frequently asked questions about Arbol
How do I install calvient/arbol in a Laravel application?
Install via Composer with composer require calvient/arbol. Laravel's package auto-discovery should register the service provider; if not, add it to config/app.php. Publish any configuration or migrations with php artisan vendor:publish, then run php artisan migrate if the package ships schema changes. Check the README for the exact provider and publish tags.
What Laravel and PHP versions does calvient/arbol support?
The supported versions are defined in the package's composer.json, so check that file or Packagist before installing. As a 1.0.x package it likely targets modern Laravel releases and PHP 8+, but confirm compatibility with Laravel 9, 10, 11, or 12 and your PHP version. If your app uses an older Laravel version, test in a branch first.
How does calvient/arbol handle nested sets versus adjacency lists?
The package provides helpers for both tree representations, including nested sets for fast ancestor and descendant queries. Nested sets store left and right bounds on each node, which makes reads efficient but writes more expensive when inserting or moving nodes. Adjacency lists use a parent_id column and are simpler to update; choose based on read versus write patterns.
Can I order sibling nodes in a hierarchical tree with calvient/arbol?
Yes, the package supports ordered category structures, so sibling nodes can be sorted by a dedicated order or position column. You can reorder nodes and maintain a consistent sequence within each parent. This is useful for menus, category trees, and any hierarchy where display order matters.
How do I query ancestors and descendants of a model using calvient/arbol?
The package adds relationship helpers and query scopes such as ancestors() and descendants() to your Eloquent model. You can call them on a node instance or use them to build queries for subtrees. For nested sets, these queries use the left and right bounds; for adjacency lists, they use recursive CTEs or iterative queries depending on the implementation.
Does calvient/arbol require database migrations or schema changes?
If you use nested sets or ordered categories, the package likely requires additional columns such as left, right, depth, or order on your table. Publish the package migrations or add the columns manually, then run php artisan migrate. For adjacency-list-only usage, you may only need a parent_id column that you already manage.
Is calvient/arbol production-ready and well maintained?
The package is at version 1.0.x, which signals API stability but not long-term support. Before production use, check the repository for test coverage, recent commits, and maintainer responsiveness. Pin a specific version in composer.json and monitor releases for compatibility updates.
How do I test tree operations in my Laravel app with calvient/arbol?
Use Laravel's testing helpers with RefreshDatabase and create model factories for your tree nodes. Write tests that assert ancestor and descendant queries return the correct nodes after inserts, moves, and deletes. If you use nested sets, include tests for reordering and subtree moves to catch boundary errors.
What are alternatives to calvient/arbol for Laravel nested sets?
Popular alternatives include kalnoy/nestedset for nested sets and Baum for adjacency-list trees. calvient/arbol differentiates itself with helpers for ordered category structures and a simple API. Compare maintenance activity, Laravel version support, and whether you need nested sets or just parent-child relationships.
How do I upgrade calvient/arbol from 1.0.3 to 1.0.4?
Update your Composer constraint to ^1.0.4 and run composer update calvient/arbol. Check the changelog for migrations or behavioral changes; if a migration is included, run php artisan migrate. Clear cached config and views, then run your test suite, focusing on tree queries, ordering, and any saved state that depends on node hierarchy.
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