lazychaser / laravel-nestedset

Effective tree structures in Laravel 4-8
3.63k stars 471 forks source link

Table isn't getting updated after creating new child #158

Open northkode opened 7 years ago

northkode commented 7 years ago

I create a child under a parent but going

$node->parent_id = $parent.id; $node->save();

but the _lft and _lrt columns remain null until in call Page::fixTree();

I shouldn't have to call this after each create should i?

northkode commented 7 years ago

Also Seems makeRoot() isn't working. I even try $node->parent_id = NULL and it doesn't work after saving..

ozgurkaragoz commented 7 years ago

+1

ozgurkaragoz commented 7 years ago

I'am using dimsav/laravel-translatable package and this nestedset package. When i disable dimsav translatable nestedset "parent_id = null" its work, but enable it is not working. This solution is working for now.