src/Models/MenuItem.php
protected function add(array $properties = [])
    {
        $properties['attributes']['id'] = $properties['attributes']['id'] ?? md5(json_encode($properties));
        $this->childs->push($item = new static($properties));

        return $item;
    }
protected function add(array $properties = [])
    {
        $properties['attributes']['id'] = $properties['attributes']['id'] ?? md5(json_encode($properties));
        $this->childs->push($item = new static($properties));

        return $item;
    }
protected function add ( array $ properties = [ ] ) { $ properties [ 'attributes' ] [ 'id' ] = $ properties [ 'attributes' ] [ 'id' ] ?? md5 ( json_encode ( $ properties ) ) ; $ this -> childs -> push ( $ item = new static ( $ properties ) ) ; return $ item ; }
Add new child item.

@param array $properties

@return static
Add new child item .