Rndwiga / laravel-menu-generator by Rndwiga

Backend navigation menu generator for Laravel 5.3 and 5.4.
191
3
4
Package Data
Maintainer Username: Rndwiga
Maintainer Contact: packages@tyondo.com (Raphael Ndwiga)
Package Create Date: 2017-03-06
Package Last Update: 2022-07-02
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-15 15:24:47
Package Statistics
Total Downloads: 191
Monthly Downloads: 3
Daily Downloads: 0
Total Stars: 3
Total Watchers: 4
Total Forks: 0
Total Open Issues: 0

laravel-menu-generator

For below laravel 5.5

register the Service provider Tyondo\MenuGenerator\TyondoMenuGeneratorServiceProvider::class,

The service prover is autoloaded in laravel 5.5 ##usage

{!! GenerateMenu::generateMenu(config('tyondo_menu_generator.navigation')) !!}

or

{!! GenerateMenu::generateMenu(config('tyondo_menu_generator.navigation',view.template)) !!}

then publish the config file:

php artisan vendor:publish

###Sample Menu

'navigation' => [
        [
            'type' => 'single',
            'title' => 'Dashboard',
            'class' => 'fa fa-fw fa-home fa-lg',
            'route' => 'gentella.home',
        ],
        [
            'type' => 'group',
            'group' => 'Assessment',
            'class' => 'fa fa-cubes fa-lg',
            'links' => [
                [
                    'title' => 'Personal Information',
                    'class' => 'fa fa-fw fa-plus',
                    'route' => 'admin.personal.information.index'
                ],
                [
                    'title' => 'Personal Assessment',
                    'class' => 'fa fa-fw fa-th-list',
                    'route' => 'admin.personal.assessment.index'
                ],
                'separator',

                [
                    'title' => 'Training Needs',
                    'class' => 'fa fa-fw fa-table',
                    'route' => 'admin.training.assessment.index'
                ],
            ]
        ],
    ],