getQualifiedLeftColumnName() public method

Get the table qualified "left" field column name.
Example #1
0
 /**
  * Return all children for the specified node.
  *
  * @param   Baum\Node $node
  * @return  Illuminate\Database\Eloquent\Collection
  */
 public function children($node)
 {
     $query = $this->node->newQuery();
     $query->where($this->node->getQualifiedParentColumnName(), '=', $node->getKey());
     // We must also add the scoped column values to the query to compute valid
     // left and right indexes.
     foreach ($this->scopedAttributes($node) as $fld => $value) {
         $query->where($this->qualify($fld), '=', $value);
     }
     $query->orderBy($this->node->getQualifiedLeftColumnName());
     $query->orderBy($this->node->getQualifiedRightColumnName());
     $query->orderBy($this->node->getQualifiedKeyName());
     return $query->get();
 }
Example #2
0
 /**
  * Checks that there are no duplicates for the `lft` and `rgt` columns.
  *
  * @return boolean
  */
 protected function validateDuplicates()
 {
     return !$this->duplicatesExistForColumn($this->node->getQualifiedLeftColumnName()) && !$this->duplicatesExistForColumn($this->node->getQualifiedRightColumnName());
 }