1. Go to this page and download the library: Download nurmanhabib/navigator 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/ */
nurmanhabib / navigator example snippets
use Nurmanhabib\Navigator\NavCollection;
use Nurmanhabib\Navigator\Navigator;
$menu = new NavCollection;
$menu->addHome();
$menu->addLink('Berita', '/berita')->match('berita*');
$menu->addSeparator();
$menu->addParent('Kategori', function (NavCollection $menu) {
$menu->addLink('Teknologi', '/kategori/teknologi');
$menu->addLink('Otomotif', '/kategori/otomotif');
$menu->addParent('Lifestyle', function (NavCollection $menu) {
$menu->addLink('Pria', '/lifestyle-pria');
$menu->addLink('Wanita', '/lifestyle-wanita');
});
});
$menu->addHeading('Configuration');
$menu->addLink('Application', '/config/app');
$menu->addHeading('Account');
$menu->addLink('My Profile', '/profile');
$menu->addLink('Logout', '/logout');
$navigator = new Navigator($menu);
echo $navigator->render();