{"id":20388545,"url":"https://github.com/efureev/laravel-trees","last_synced_at":"2025-04-08T12:09:17.841Z","repository":{"id":34082491,"uuid":"160159399","full_name":"efureev/laravel-trees","owner":"efureev","description":"tree structures with best perfomance","archived":false,"fork":false,"pushed_at":"2025-03-10T08:32:23.000Z","size":389,"stargazers_count":130,"open_issues_count":1,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T11:07:07.881Z","etag":null,"topics":["laravel","nestedset","php","tree","tree-structure"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/efureev.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-03T08:44:02.000Z","updated_at":"2025-03-28T07:31:52.000Z","dependencies_parsed_at":"2023-09-27T04:23:42.940Z","dependency_job_id":"28191e76-ea1b-4912-aa96-fcf4979da259","html_url":"https://github.com/efureev/laravel-trees","commit_stats":{"total_commits":167,"total_committers":8,"mean_commits":20.875,"dds":0.5149700598802396,"last_synced_commit":"a7145b0544eb60177adb4e691905d823abee7a4b"},"previous_names":[],"tags_count":79,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Flaravel-trees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Flaravel-trees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Flaravel-trees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Flaravel-trees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efureev","download_url":"https://codeload.github.com/efureev/laravel-trees/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838444,"owners_count":21004580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","nestedset","php","tree","tree-structure"],"created_at":"2024-11-15T03:11:22.615Z","updated_at":"2025-04-08T12:09:17.821Z","avatar_url":"https://github.com/efureev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![PHP Laravel Package](https://github.com/efureev/laravel-trees/workflows/PHP%20Laravel%20Package/badge.svg?branch=master)\n![](https://img.shields.io/badge/php-8.2|8.3-blue.svg)\n![](https://img.shields.io/badge/Laravel-^11.*-red.svg)\n[![Total Downloads](https://poser.pugx.org/efureev/laravel-trees/downloads)](https://packagist.org/packages/efureev/laravel-trees)\n[![License](https://poser.pugx.org/efureev/laravel-trees/license)](https://packagist.org/packages/efureev/laravel-trees)\n[![composer.lock available](https://poser.pugx.org/efureev/laravel-trees/composerlock)](https://packagist.org/packages/efureev/laravel-trees)\n\n[![Latest Stable Version](https://poser.pugx.org/efureev/laravel-trees/version)](https://packagist.org/packages/efureev/laravel-trees)\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/69eff0098adbf728341d/maintainability)](https://codeclimate.com/github/efureev/laravel-trees/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/69eff0098adbf728341d/test_coverage)](https://codeclimate.com/github/efureev/laravel-trees/test_coverage)\n\n# Laravel Tree Structure\n\n__Contents:__\n\n- [Theory](#information)\n- [Installation](#installation)\n- [Documentation](#documentation)\n  - [Basic](docs/Basic.md)\n  - [AdvancedTreeConfig](docs/AdvancedTreeConfig.md)\n  - [Migration](docs/Migration.md)\n  - [Creating Nodes](docs/CreatingNodes.md)\n  - [Managing Nodes](docs/ManagingNodes.md)\n  - [Receiving Nodes](docs/ReceivingNodes.md)\n  - [Model's Helpers](docs/Helpers.md)\n  - [Console](docs/Console.md)\n  - [Health And Fixing.md](docs/HealthAndFix.md)\n\n## Information\n\nThis package is Multi-Tree structures (a lot of root-nodes).\n\n### Screenshots\n\n\u003cdiv\u003e\n  \u003cimg src=\"./docs/assets/tree.png\" alt=\"html tree\" style=\"max-width: 400px\" /\u003e\n  \u003cimg src=\"./docs/assets/table.png\" alt=\"console tree\" style=\"max-width: 800px\" /\u003e\n\u003c/div\u003e\n\n### What are nested sets?\n\nNested sets or [Nested Set Model](http://en.wikipedia.org/wiki/Nested_set_model) is a way to effectively store\nhierarchical data in a relational table. From wikipedia:\n\n\u003e The nested set model is to number the nodes according to a tree traversal,\n\u003e which visits each node twice, assigning numbers in the order of visiting, and\n\u003e at both visits. This leaves two numbers for each node, which are stored as two\n\u003e attributes. Querying becomes inexpensive: hierarchy membership can be tested by\n\u003e comparing these numbers. Updating requires renumbering and is therefore expensive.\n\n### Applications\n\nNSM shows good performance when tree is updated rarely. It is tuned to be fast for getting related nodes. It is ideally\nsuited for building multi-depth menu or categories for shop.\n\n## Requirements\n\n- PHP: 8.2|8.3\n- Laravel: ^11.*\n\nIt is highly suggested to use database that supports transactions (like Postgres) to secure a tree from possible\ncorruption.\n\n## Installation\n\n```shell\ncomposer require efureev/laravel-trees\n```\n\n## Testing\n\n```shell\n./vendor/bin/phpunit --testdox\n# or\ncomposer test\n```\n\n## Documentation\n\nThe package allows to create multi-root structures: no only-one-root! And allows to move nodes between trees.  \nMoreover, it also works with different model's primary key: `int`, `uuid`, `ulid`.\n\n- [Basic](docs/Basic.md)\n- [AdvancedTreeConfig](docs/AdvancedTreeConfig.md)\n- [Migration](docs/Migration.md)\n- [Creating Nodes](docs/CreatingNodes.md)\n- [Managing Nodes](docs/ManagingNodes.md)\n- [Receiving Nodes](docs/ReceivingNodes.md)\n- [Model's Helpers](docs/Helpers.md)\n- [Console](docs/Console.md)\n- [Health And Fixing.md](docs/HealthAndFix.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Flaravel-trees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefureev%2Flaravel-trees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Flaravel-trees/lists"}