public function getChilds()
    {
        if (config('menus.ordering')) {
            return collect($this->childs)->sortBy(function ($child) {
                return $child->order;
            })->all();
        }

        return $this->childs;
    }
public function getChilds()
    {
        if (config('menus.ordering')) {
            return collect($this->childs)->sortBy(function ($child) {
                return $child->order;
            })->all();
        }

        return $this->childs;
    }
public function getChilds ( ) { if ( config ( 'menus.ordering' ) ) { return collect ( $ this -> childs ) -> sortBy ( function ( $ child ) { return $ child -> order ; } ) -> all ( ) ; } return $ this -> childs ; }
Get childs.

@return array
Get childs .