PHP code example of lm-commons / lmc-bootstrap-menu

1. Go to this page and download the library: Download lm-commons/lmc-bootstrap-menu library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lm-commons / lmc-bootstrap-menu example snippets



return [
    'modules' => [
        // ...
        'Laminas\Navigation', // <-- Add this line if not present
        'LmcBootstrapMenu', // <-- Add this line in your root_path/config/modules.config.php file
        'Application',
    ],
];



// Application/config/module.config.php
return [

    // ...
    'navigation' => [
      'default' => [
        'home' => [
           'label' => 'Home',
           'route' => 'home',
        ],
        'category' => [
          'label' => 'Category',
          'uri' => '#',
          'pages' => [
            'php' => [
              'label' => 'PHP',
              'uri' => 'https://www.php.net',
            ],
            'laminas' => [
              'label' => 'Laminas',
              'uri' => 'https://getlaminas.org/',
            ],
            'devider' => [
               'label' => '--devider', // most important
               'route' => '#',
            ],
            'magento' => [
              'label' => 'Magento',
              'uri' => 'https://business.adobe.com/products/magento/magento-commerce.html',
            ],
          ],
        ]
      ]
    ],
];



<?=$this->navigation('default')
                    ->bootstrapMenu()
                    ->setUlClass('navbar-nav');