techcon / nestedsets
Package for manipuate nestedsets in Laravel without Eloquent ORM
v1.0.0
2016-07-05 10:30 UTC
Requires
- php: >=5.5.9
- laravel/framework: 5.2.*
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2024-12-15 15:16:49 UTC
README
Package for manipuate nestedsets in Laravel without Eloquent ORM
How to use
- Create: $nestedset = Nestedsets::factory('TableName');
- Move:
- $nestedset->move('current_item_id', 'sibiling_item_id')->before(); // This move item before other element
- $nestedset->move('current_item_id', 'parent_item_id' or 0)->asChild(); // This move item as last element to parent
- Delete: $nestedset->deleteNode('item_id'); // This delete node and all childs