PHP code example of aiman / nova-menu-builder

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

    

aiman / nova-menu-builder example snippets


public function run()
{
    $this->call(LanguagesTableSeeder::class);
}

// in app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        new \Aiman\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') !!}

{!! menu_type('main_menu') !!}
bash
php artisan vendor:publish --provider="Aiman\MenuBuilder\ToolServiceProvider"
php artisan migrate

php artisan db:seed