etrepat / baum

Baum is an implementation of the Nested Set pattern for Laravel's Eloquent ORM.
http://etrepat.com/baum
MIT License
2.24k stars 460 forks source link

NestedList doesn't seems to be working. #186

Open berpcor opened 9 years ago

berpcor commented 9 years ago
...getNestedList('title');

I just get plain array of title values.

1 => 'Root',
2 => ' Child',
3 => ' Child',
4 => '  Child',
5 => ' Child',
6 => 'Root'

There is no indication of level like:

1 => 'Root 1',
2 => ' Child 1',
3 => ' Child 2',
4 => '  Child 2.1',
5 => ' Child 3',
6 => 'Root 2'
azulkipli commented 9 years ago

this method return flattern array

Model::getNestedList($column,null,'→');

Output will add an arrow before each child