src/Gzero/EloquentTree/Model/Observer.php
public function saving(Tree $model)
    {
        if (!$model->exists and !in_array('path', array_keys($model->attributesToArray()), TRUE)) {
            $model->{$model->getTreeColumn('path')}   = '';
            $model->{$model->getTreeColumn('parent')} = NULL;
            $model->{$model->getTreeColumn('level')}  = 0;
        }
    }
public function saving(Tree $model)
    {
        if (!$model->exists and !in_array('path', array_keys($model->attributesToArray()), TRUE)) {
            $model->{$model->getTreeColumn('path')}   = '';
            $model->{$model->getTreeColumn('parent')} = NULL;
            $model->{$model->getTreeColumn('level')}  = 0;
        }
    }
public function saving ( Tree $ model ) { if ( ! $ model -> exists and ! in_array ( 'path' , array_keys ( $ model -> attributesToArray ( ) ) , TRUE ) ) { $ model -> { $ model -> getTreeColumn ( 'path' ) } = '' ; $ model -> { $ model -> getTreeColumn ( 'parent' ) } = NULL ; $ model -> { $ model -> getTreeColumn ( 'level' ) } = 0 ; } }
When saving node we must set path and level

@param Tree $model
When saving node we must set path and level