PHP code example of energon7 / nova-menu-builder

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

    

energon7 / nova-menu-builder example snippets


// in app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        new \Energon7\MenuBuilder\MenuBuilder(),
    ];
}

{!! menu_builder('main') !!}

//or

{!! menu_builder('main', 'parent-class', 'child-class',with children(boolean) , with active/deactive(boolean), 'dl', 
'dd') !!}

booleans default is true

{!! menu_json('main') !!}
bash
php artisan vendor:publish --provider="Energon7\MenuBuilder\MenuBuilderServiceProvider"
php artisan migrate