PHP code example of anroots / menu

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

    

anroots / menu example snippets


<? if ($user->get_role() === Role::ANONYMOUS):

<?
return [
'items' => [
            'url'     => 'home',
            'title'   => 'Home',
        ],
        [
            'url'     => 'about',
            'title'   => 'About',
        ],
];


Kohana::modules(array(
	...
	'menu' => MODPATH.'menu',
));

	$menu = Menu::factory($role); // this could use `config/menu/(user|admin).php`

	$menu->set_current('article/show');
javascript
{
	".4.0",
		"composer/installers": "*",
		"anroots/menu":"2.*"
	}
}