PHP code example of devitek / extensible-menu
1. Go to this page and download the library: Download devitek/extensible-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/ */
devitek / extensible-menu example snippets
$html = (new Devitek\Menu\Renderer\TwitterBootstrap\Navbar())
->translateWith(new Devitek\Menu\Translator\LaravelTranslator())
->resolveUrlWith(new Devitek\Menu\Resolver\LaravelResolver())
->isFluid()
->handleResponsive()
->isFixedTop()
->withBrand('My super project', '/')
->onTheLeft((new Menu())->with([
(new IconLink('pages.home.link'))->withDestination('home')->withIcon('glyphicon glyphicon-home'),
]))
->onTheRight((new Menu())->with([
(new Devitek\Menu\Items\IconGroup('pages.account.link'))->withIcon('glyphicon glyphicon-user')->need([
function () { return ! Auth::guest(); }
]) ->withUnder([
(new Devitek\Menu\Items\IconLink('pages.administration.utilisateurs.lien'))->withDestination('administration.utilisateurs')->withIcon('glyphicon glyphicon-cog'),
]),
]))
->render();