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

Building/Rebuilding tree within given scope #245

Closed salehliam closed 8 years ago

salehliam commented 8 years ago

Hello Guys,

I'm trying to figure out how to build/rebuild tree using given nodes collection and within a given scope. No success. Any suggestion?

My model extending Baum\Node class has the following property declared

protected $scoped = array('firm_id');

And firm_id saves into database properly. Everytime I serialize my structure from the view and pass it to the build method I wish only nodes with given 'firm_id' were processed and the others remained intact.

Thanks in advance!

Machecek commented 7 years ago

Did you find any solution to this? @salehliam