PHP code example of mrssoft / yii2-menu

1. Go to this page and download the library: Download mrssoft/yii2-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/ */

    

mrssoft / yii2-menu example snippets


 echo Menu::widget([
      'options' => ['class' => 'my-menu']
      'items' => [
          ['label' => 'Login', 'url' => '/user/login'],
          [
          	'label' => 'Logout', 
            'url' => ['user/logout'], 
            'data-method' => 'post'
          ],
       ]
 ]);