public function children( $model )
	{
		$query = $this->model->newQuery();

		$query->where( $this->model->getQualifiedParentColumnName(), '=', $model->getKey() );

		// We must also add the scoped column values to the query to compute valid
		// left and right indexes.
		foreach ( $this->scopedAttributes( $model ) as $fld => $value )
			$query->where( $this->qualify( $fld ), '=', $value );

		$query->orderBy( $this->model->getQualifiedLeftColumnName() );
		$query->orderBy( $this->model->getQualifiedRightColumnName() );
		$query->orderBy( $this->model->getQualifiedKeyName() );

		return $query->get();
	}
public function children( $model )
	{
		$query = $this->model->newQuery();

		$query->where( $this->model->getQualifiedParentColumnName(), '=', $model->getKey() );

		// We must also add the scoped column values to the query to compute valid
		// left and right indexes.
		foreach ( $this->scopedAttributes( $model ) as $fld => $value )
			$query->where( $this->qualify( $fld ), '=', $value );

		$query->orderBy( $this->model->getQualifiedLeftColumnName() );
		$query->orderBy( $this->model->getQualifiedRightColumnName() );
		$query->orderBy( $this->model->getQualifiedKeyName() );

		return $query->get();
	}
public function children ( $ model ) { $ query = $ this -> model -> newQuery ( ) ; $ query -> where ( $ this -> model -> getQualifiedParentColumnName ( ) , '=' , $ model -> getKey ( ) ) ; // We must also add the scoped column values to the query to compute valid // left and right indexes. foreach ( $ this -> scopedAttributes ( $ model ) as $ fld => $ value ) $ query -> where ( $ this -> qualify ( $ fld ) , '=' , $ value ) ; $ query -> orderBy ( $ this -> model -> getQualifiedLeftColumnName ( ) ) ; $ query -> orderBy ( $ this -> model -> getQualifiedRightColumnName ( ) ) ; $ query -> orderBy ( $ this -> model -> getQualifiedKeyName ( ) ) ; return $ query -> get ( ) ; }
Return all children for the specified node.

@param   NestedModel $model
@return  Collection
Return all children for the specified node .