children() публичный Метод

Children relation (self-referential) 1-N.
public children ( ) : Illuminate\Database\Eloquent\Relations\HasMany
Результат Illuminate\Database\Eloquent\Relations\HasMany
 /**
  * Renders the specified category and it's children in single dimension array.
  *
  * @param Node $node
  *
  * @return array
  */
 public static function getRenderedNode(Node $node)
 {
     $options = [];
     if ($node->isRoot()) {
         $name = $node->name;
     } else {
         $depth = str_repeat('--', $node->depth);
         $name = sprintf('%s %s', $depth, $node->name);
     }
     $options[$node->id] = $name;
     if ($node->children()->count() > 0) {
         foreach ($node->children as $child) {
             $options = $options + static::getRenderedNode($child);
         }
     }
     return $options;
 }