quadrogod / laravel-nestedsets by quadrogod

Package for manipuate nestedsets in Laravel without Eloquent ORM
9
1
1
Package Data
Maintainer Username: quadrogod
Maintainer Contact: admin@tech-con.kz (A-lex)
Package Create Date: 2016-07-05
Package Last Update: 2016-07-05
Language: PHP
License: MIT
Last Refreshed: 2024-12-12 15:01:34
Package Statistics
Total Downloads: 9
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

laravel-nestedsets

Package for manipuate nestedsets in Laravel without Eloquent ORM

How to use

  1. Create: $nestedset = Nestedsets::factory('TableName');
  2. Move:
  3. $nestedset->move('current_item_id', 'sibiling_item_id')->before(); // This move item before other element
  4. $nestedset->move('current_item_id', 'parent_item_id' or 0)->asChild(); // This move item as last element to parent
  5. Delete: $nestedset->deleteNode('item_id'); // This delete node and all childs