https://github.com/beyondlex/mongotree
Laravel package for working with nested trees in MongoDB
https://github.com/beyondlex/mongotree
Last synced: 4 months ago
JSON representation
Laravel package for working with nested trees in MongoDB
- Host: GitHub
- URL: https://github.com/beyondlex/mongotree
- Owner: beyondlex
- Created: 2018-01-11T09:00:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T11:24:37.000Z (almost 8 years ago)
- Last Synced: 2025-12-14T22:06:25.915Z (7 months ago)
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a Laravel package for working with nested trees in MongoDB (https://github.com/jenssegers/laravel-mongodb).
Based on [kalnoy/nestedset](https://github.com/lazychaser/laravel-nestedset)
__Contents:__
- [Installation](#installation)
- [Usage](#usage)
Installation
------------
To install the package, in terminal:
```
composer require beyondlex/mongotree
```
#### The model
Your model should use `Lex\Mongotree\TreeTrait` trait to enable nested sets:
```php
use Lex\Mongotree\TreeTrait;
class Foo extends Model {
use TreeTrait;
}
```
Usage
------------
For usage please refer to original library https://github.com/lazychaser/laravel-nestedset