public function getOrderedItems()
    {
        if (config('menus.ordering') || $this->ordering) {
            return $this->toCollection()->sortBy(function ($item) {
                return $item->order;
            })->all();
        }

        return $this->items;
    }
public function getOrderedItems()
    {
        if (config('menus.ordering') || $this->ordering) {
            return $this->toCollection()->sortBy(function ($item) {
                return $item->order;
            })->all();
        }

        return $this->items;
    }
public function getOrderedItems ( ) { if ( config ( 'menus.ordering' ) || $ this -> ordering ) { return $ this -> toCollection ( ) -> sortBy ( function ( $ item ) { return $ item -> order ; } ) -> all ( ) ; } return $ this -> items ; }
Get menu items and order it by 'order' key.

@return array
Get menu items and order it by order key .