code: 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;
    }
docs: Get a new "scoped" query builder for the Node's model.
  
  @param  bool  $excludeDeleted
  @return \Illuminate\Database\Eloquent\Builder|static