예제 #1
0
 /**
  * Get descendants of specified node.
  *
  * @since 2.0
  *
  * @param mixed $id
  * @param array $columns
  *
  * @return \Kalnoy\Nestedset\Collection
  */
 public function descendantsOf($id, array $columns = array('*'))
 {
     try {
         return $this->whereDescendantOf($id)->get($columns);
     } catch (ModelNotFoundException $e) {
         return $this->model->newCollection();
     }
 }