PHPackages                             cf-git/lamb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. cf-git/lamb

ActivePackage

cf-git/lamb
===========

Laravel menu builder

015[1 PRs](https://github.com/cf-git/lamb/pulls)PHP

Since Apr 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/cf-git/lamb)[ Packagist](https://packagist.org/packages/cf-git/lamb)[ RSS](/packages/cf-git-lamb/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

LAMB
====

[](#lamb)

Laravel Menu Builder v1
-----------------------

[](#laravel-menu-builder-v1)

### Intro

[](#intro)

### Supports

[](#supports)

Laravel 5.7 or higher

### Fast start

[](#fast-start)

- Add package to project with `composer require cf-git/lamb`
- Publish configuration folder `./artisan vendor:publish --tag=lamb-config` or `./artisan vendor:publish --tag=config`
- Edit config main section in config/lamb/main.php file to be

```
return [
    //...
    'menu' => [
        // menu items
        [
            'title' => 'Docs',
            'href' => 'https://laravel.com/docs',
        ],
        [
            'title' => 'Laracasts',
            'href' => 'https://laracasts.com',
        ],
        //...
        [
            'title' => 'GitHub',
            'href' => 'https://github.com/laravel/laravel',
        ],
    ],
];
```

- Then reset config cache `./artisan config:cache`
- Then you can output your menu in templates, like in welcome.blade.php

```

        @foreach($lamb->menu('main') as $item)
            {{ $item['title'] }}
        @endforeach

```

### Add new menu type

[](#add-new-menu-type)

You can make any menus as you need with making config file in config/lamb directory with same structure. For example, we can make profile menu for user with custom menu parameters

```
