PHPackages                             vienasbaitas/menu - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. vienasbaitas/menu

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vienasbaitas/menu
=================

Simple package to generate menu.

1.1.0(2y ago)48.2k↑153.1%MITPHPPHP &gt;=7.4

Since Aug 11Pushed 2y agoCompare

[ Source](https://github.com/mbvienasbaitas/menu)[ Packagist](https://packagist.org/packages/vienasbaitas/menu)[ RSS](/packages/vienasbaitas-menu/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Lightweight menu management
===========================

[](#lightweight-menu-management)

This package allows you to add simple and easy menu management to your project. Supports nested menu items.

Installation
------------

[](#installation)

```
composer require vienasbaitas/menu:^1.0
```

Usage
-----

[](#usage)

In order to use menu you need to create menu instance, after that just push new menu items to it.

```
$menu = new \VienasBaitas\Menu\Menu();

$menu->option('admin', true);

$menu->item('Dashboard')->path('/dashboard')->active()->option('auth', true);
$menu->item('Settings')->path('/settings')->order(0);
$menu->item('Blog')->path('/blog')->target(\VienasBaitas\Menu\MenuItem::TARGET_BLANK);
```

After menu has been initialized you can return whole menu object to your view, alternatively you can use built-in array renderer to render your menu as an array.

```
$renderer = new \VienasBaitas\Menu\Renderers\ArrayRenderer();

$asArray = $renderer->render($menu);
```

Available methods
-----------------

[](#available-methods)

### VienasBaitas\\Menu\\Menu

[](#vienasbaitasmenumenu)

MethodDescriptionoptions(array $options): VienasBaitas\\Menu\\MenuSet menu instance options.option($key, $value): VienasBaitas\\Menu\\MenuSet menu instance option.item(string $title): VienasBaitas\\Menu\\MenuItemReturns existing or creates a new item with given title.### VienasBaitas\\Menu\\MenuItem

[](#vienasbaitasmenumenuitem)

MethodDescriptionpath(?string $path): VienasBaitas\\Menu\\MenuItemAssigns path to menu item.active(): VienasBaitas\\Menu\\MenuItemMarks menu item as active.inactive(): VienasBaitas\\Menu\\MenuItemMarks menu item as inactive.order(int $order): VienasBaitas\\Menu\\MenuItemSets menu item order.target(?string $target): VienasBaitas\\Menu\\MenuItemSets menu item's target, for example `_blank`.options(array $options): VienasBaitas\\Menu\\MenuItemSet menu item instance options.option($key, $value): VienasBaitas\\Menu\\MenuItemSet menu item instance option.child(string $title): VienasBaitas\\Menu\\MenuItemReturns existing or creates a new child item with given title.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1282 days

Total

2

Last Release

825d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0802c23b9fd902a5c8a571164693f46ae1c83e0b2c470941f3ca8d5f146c41d?d=identicon)[edvinaskrucas](/maintainers/edvinaskrucas)

---

Top Contributors

[![edvinaskrucas](https://avatars.githubusercontent.com/u/2177571?v=4)](https://github.com/edvinaskrucas "edvinaskrucas (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vienasbaitas-menu/health.svg)

```
[![Health](https://phpackages.com/badges/vienasbaitas-menu/health.svg)](https://phpackages.com/packages/vienasbaitas-menu)
```

###  Alternatives

[olimortimer/laravelshoppingcart

Laravel Shoppingcart

4343.2k](/packages/olimortimer-laravelshoppingcart)[rap2hpoutre/remove-stop-words

Remove stop words from a string

1528.3k](/packages/rap2hpoutre-remove-stop-words)[wenhainan/thinkcsv

csv处理组件,导入导出csv

223.4k](/packages/wenhainan-thinkcsv)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
