public static function build($items, callable $callback, self $initial = null)
    {
        return ($initial ?: static::new())->fill($items, $callback);
    }
public static function build($items, callable $callback, self $initial = null)
    {
        return ($initial ?: static::new())->fill($items, $callback);
    }
public static function build ( $ items , callable $ callback , self $ initial = null ) { return ( $ initial ? : static :: new ( ) ) -> fill ( $ items , $ callback ) ; }
Build a new menu from an array. The callback receives a menu instance as
the accumulator, the array item as the second parameter, and the item's
key as the third.

@param array|\Iterator $items
@param callable $callback
@param \Spatie\Menu\Menu|null $initial

@return static
Build a new menu from an array . The callback receives a menu instance as the accumulator the array item as the second parameter and the item s key as the third .