public function menuLinkPanels()
    {
        $this->getAllMenuLinkRoutes();
        $models = File::files(base_path('app/Models'));
        $panels = [];
        foreach($models as $file){
            $modelName = str_replace('.php', '', $file->getFileName()); // extract model name
            $modelClass ='App\\Models\\'.$modelName;

            if(method_exists($modelClass, 'menuLinkPanel')) {
                $menuPanels = $modelClass::menuLinkPanel();
                // handle one dimension menuLinkRoutes
                if(isset($menuPanels['items'])) {
                    $menuPanels['routes'] = $this->getMenuLinkRoutes($menuPanels['controller'], (isset($menuPanels['belongsTo']) ? $menuPanels['belongsTo'] : ''));
                    $panels[] = $menuPanels;
                }else{
                    foreach($menuPanels as $panelKey=>$panel){
                        $panel['routes'] = $this->getMenuLinkRoutes($panel['controller'], (isset($panel['belongsTo']) ? $panel['belongsTo'] : ''));
                        $panels[] = $panel;
                    }
                }
            }
        }
        return $panels;
    }
public function menuLinkPanels()
    {
        $this->getAllMenuLinkRoutes();
        $models = File::files(base_path('app/Models'));
        $panels = [];
        foreach($models as $file){
            $modelName = str_replace('.php', '', $file->getFileName()); // extract model name
            $modelClass ='App\\Models\\'.$modelName;

            if(method_exists($modelClass, 'menuLinkPanel')) {
                $menuPanels = $modelClass::menuLinkPanel();
                // handle one dimension menuLinkRoutes
                if(isset($menuPanels['items'])) {
                    $menuPanels['routes'] = $this->getMenuLinkRoutes($menuPanels['controller'], (isset($menuPanels['belongsTo']) ? $menuPanels['belongsTo'] : ''));
                    $panels[] = $menuPanels;
                }else{
                    foreach($menuPanels as $panelKey=>$panel){
                        $panel['routes'] = $this->getMenuLinkRoutes($panel['controller'], (isset($panel['belongsTo']) ? $panel['belongsTo'] : ''));
                        $panels[] = $panel;
                    }
                }
            }
        }
        return $panels;
    }
public function menuLinkPanels ( ) { $ this -> getAllMenuLinkRoutes ( ) ; $ models = File :: files ( base_path ( 'app/Models' ) ) ; $ panels = [ ] ; foreach ( $ models as $ file ) { $ modelName = str_replace ( '.php' , '' , $ file -> getFileName ( ) ) ; // extract model name $ modelClass = 'App\\Models\\' . $ modelName ; if ( method_exists ( $ modelClass , 'menuLinkPanel' ) ) { $ menuPanels = $ modelClass :: menuLinkPanel ( ) ; // handle one dimension menuLinkRoutes if ( isset ( $ menuPanels [ 'items' ] ) ) { $ menuPanels [ 'routes' ] = $ this -> getMenuLinkRoutes ( $ menuPanels [ 'controller' ] , ( isset ( $ menuPanels [ 'belongsTo' ] ) ? $ menuPanels [ 'belongsTo' ] : '' ) ) ; $ panels [ ] = $ menuPanels ; } else { foreach ( $ menuPanels as $ panelKey => $ panel ) { $ panel [ 'routes' ] = $ this -> getMenuLinkRoutes ( $ panel [ 'controller' ] , ( isset ( $ panel [ 'belongsTo' ] ) ? $ panel [ 'belongsTo' ] : '' ) ) ; $ panels [ ] = $ panel ; } } } } return $ panels ; }
Get all panels from controllers' menuLinkRoutes.
Used to create link panels options for adding in the menu.

@return array
@throws \Exception
Get all panels from controllers menuLinkRoutes . Used to create link panels options for adding in the menu .