PHP code example of helilabs / menu-generator

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

    

helilabs / menu-generator example snippets


Helilabs\HeliMenuGenerator\LaravelLogic\HeliMenuGeneratorServiceProvider::class,

'Menu' => Helilabs\HeliMenuGenerator\LaravelLogic\HeliMenuGenerator::class,

$menu = [
    'dashboard' => [
        'icon' => 'ti-panel',
        'text' => trans('messages.dashboard'),
        'url' => url('/')
    ],
    'users' => [
        'icon' => 'ti-user',
        'text' => trans('messages.users'),
        'url' => url('/')
    ],
    'productsContainer' => [
        'icon' => 'ti-package',
        'text' => trans('messages.products'),
        'url' => '#',
        'children' => [
            'products' => [
                'icon' => 'ti-package',
                'text' => trans('messaegs.products'),
                'url' => url('/products'),
            ],
            'categories' => [
                'icon' => 'ti-layers-alt',
                'text' => trans('messages.categories'),
                'url' => url('/categories')
            ]
        ]
    ],
    'orders' => [
        'icon' => 'ti-shopping-cart',
        'text' => trans('messages.orders'),
        'url' => url('/')
    ],
];

{!! HeliMenuGenerator::parse( $menu ) !!}