This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
jasonwong
ok,I found a way that is used \October\Rain\Database\Traits\NestedTree
in the plugin model class.
iulianBilcu
Model:
<?php namespace Plugin\Models;
use Model;
use October\Rain\Database\Traits\NestedTree;
class Group extends Model
{
use NestedTree;
// other code
}
config_list.yaml
showTree: 1 //Display tree view
treeExpanded: 1 // Tree expanded by default
Migration additional fields
$table->integer('nest_left');
$table->integer('nest_right');
$table->integer('nest_depth');
1-5 of 5