{"repo":"aimeos/laravel-nestedset","free":true,"listed":false,"github":"https://github.com/aimeos/laravel-nestedset","clone":"git clone https://github.com/aimeos/laravel-nestedset.git","description":"Effective tree structures for SQL databases in Laravel using nested sets","language":"PHP","stars":38,"topics":["laravel","nested-set","nested-structures","tree","mariadb","mysql","php","postgresql","rdbms","sqlite3"],"license":null,"category":"databases-storage","readme_excerpt":"Laravel tree structure using nested sets A Laravel package for working with trees in relational databases. This package is the successor of the abandoned kalnoy/laravel-nestedset package. Theory Requirements Installation Setup Changelog Deprecations Migration Usage Tree safety Relationships Inserting nodes Retrieving nodes Building a tree Deleting nodes Helper methods Consistency checking & fixing Scoping License What are nested sets? Nested sets or Nested Set Model is a way to effectively store hierarchical data in a relational table by assigning two numbers to each node which span the used numbers of the child nodes. From Wikipedia: Nested Sets shows good performance when tree is updated rarely. It is tuned to be fast for getting related nodes. It'is ideally suited for building multi-depth menu or categories for shop. The data structure isn't suited for trees that must be updated often compared to the number of reads. Requirements PHP = 8.1 Laravel = 10.0 MySQL, MariaDB, PostgreSQL, SQLite, SQL Server Installation To install the package, execute in terminal: Setup The schema To extend your table with nested set columns in the up() method of your migration file: To remove the nested set columns from your table in down() use: The model Your model should use Aimeos\\Nestedset\\NodeTrait trait to enable nested sets: Changelog 7.x Changed namespace from Kalnoy to Aimeos UUID and configurable ID type support New depth column to improve performance Full SQL Server support Strict par","default_branch":null,"files":null,"tree":[],"storefront":"/r/aimeos","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/aimeos/laravel-nestedset/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}