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

        if ($children instanceof Collection) {
            $children->prepend($presence);
        } else {
            $children = array_prepend($children, $presence);
        }

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

        if ($children instanceof Collection) {
            $children->prepend($presence);
        } else {
            $children = array_prepend($children, $presence);
        }

        $this->children = $children;
    }
public function shiftChild ( MenuPresenceInterface $ presence ) { $ children = $ this -> children ? : [ ] ; if ( $ children instanceof Collection ) { $ children -> prepend ( $ presence ) ; } else { $ children = array_prepend ( $ children , $ presence ) ; } $ this -> children = $ children ; }
Adds a child to the front of the child list.

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