public function newNestedSetQuery($excludeDeleted = true) {
    $builder = $this->newQuery($excludeDeleted)->orderBy($this->getQualifiedOrderColumnName());

    if ( $this->isScoped() ) {
      foreach($this->scoped as $scopeFld)
        $builder->where($scopeFld, '=', $this->$scopeFld);
    }

    return $builder;
  }
public function newNestedSetQuery($excludeDeleted = true) {
    $builder = $this->newQuery($excludeDeleted)->orderBy($this->getQualifiedOrderColumnName());

    if ( $this->isScoped() ) {
      foreach($this->scoped as $scopeFld)
        $builder->where($scopeFld, '=', $this->$scopeFld);
    }

    return $builder;
  }
public function newNestedSetQuery ( $ excludeDeleted = true ) { $ builder = $ this -> newQuery ( $ excludeDeleted ) -> orderBy ( $ this -> getQualifiedOrderColumnName ( ) ) ; if ( $ this -> isScoped ( ) ) { foreach ( $ this -> scoped as $ scopeFld ) $ builder -> where ( $ scopeFld , '=' , $ this -> $ scopeFld ) ; } return $ builder ; }
Get a new "scoped" query builder for the Node's model.

@param  bool  $excludeDeleted
@return \Illuminate\Database\Eloquent\Builder|static
Get a new scoped query builder for the Node s model .