src/Support/Data/MenuPresence.php
public function addChild(MenuPresenceInterface $presence)
    {
        $children = $this->children ?: [];

        if ($children instanceof Collection) {
            $children->push($presence);
        } else {
            $children[] = $presence;
        }

        $this->children = $children;
    }
public function addChild(MenuPresenceInterface $presence)
    {
        $children = $this->children ?: [];

        if ($children instanceof Collection) {
            $children->push($presence);
        } else {
            $children[] = $presence;
        }

        $this->children = $children;
    }
public function addChild ( MenuPresenceInterface $ presence ) { $ children = $ this -> children ? : [ ] ; if ( $ children instanceof Collection ) { $ children -> push ( $ presence ) ; } else { $ children [ ] = $ presence ; } $ this -> children = $ children ; }
Adds a child to the end of the child list.

@param MenuPresenceInterface $presence
Adds a child to the end of the child list .