PHP code example of webx-ui / module-menu

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

    

webx-ui / module-menu example snippets


// config/webx-menu.php
'menus' => [
    'header' => ['title' => 'Header', 'variants' => ['link', 'button']],
    'footer' => ['title' => 'Footer'],
],

menu('header');               // a MenuTree — a collection of MenuLink, nested
menu('footer')->flat();       // the same items without the nesting
menu('header', locale: 'uk'); // another language

app(WebxUi\Menu\MenuCache::class)->flush();

'cache' => ['enabled' => true, 'ttl' => 3600],
bash
php artisan vendor:publish --tag=webx-menu-views