thunderid / eloquent-tree-model
There is no license information available for the latest version (dev-master) of this package.
eloquent tree structured model
dev-master
2015-03-17 01:36 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-04-26 19:55:17 UTC
README
#Attributes
name : name of the node
tree_path : path of the node
tree_path_delimiter : delimiter of the path
#Usage
- Create a model class
- Add this code to your model:
use \ThunderID\EloquentTreeModel\ITreeModel;
use \ThunderID\EloquentTreeModel\TreeModelTrait;
use \ThunderID\EloquentTreeModel\TreeModelObserver;
- Update your model to implements ITreeModel
class MyModel extends Model implements ITreeModel
- Use TreeModel trait in your model
use TreeModelTrait;
- Assign observer to your model
static::observe(new TreeModelObserver);