PHP code example of bigfishtv / magicmenu

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

    

bigfishtv / magicmenu example snippets


$this->loadHelper('MagicMenu.MagicMenu');

$items = [
    ['title' => 'About', 'url' => '/about'],
    ['title' => 'Work', 'url' => '/work', 'children' => [
        ['title' => 'One', 'url' => '/work/one'],
        ['title' => 'Two', 'url' => '/work/two'],
        ['title' => 'Three & Four', 'url' => '/work/three-and-four'],
    ]],
    ['title' => 'Contact', 'url' => '/contact']
];
$menu = $this->MagicMenu->create($items);
echo $menu->render();