beyondlex / mongotree

Laravel package for working with nested trees in MongoDB
3 stars 1 forks source link

This is a Laravel package for working with nested trees in MongoDB (https://github.com/jenssegers/laravel-mongodb).

Based on kalnoy/nestedset

Contents:

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:

use Lex\Mongotree\TreeTrait;

class Foo extends Model {
    use TreeTrait;
}

Usage

For usage please refer to original library https://github.com/lazychaser/laravel-nestedset