PHPackages                             dnabeast/tabmenu - 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. [Templating &amp; Views](/categories/templating)
4. /
5. dnabeast/tabmenu

ActiveLibrary[Templating &amp; Views](/categories/templating)

dnabeast/tabmenu
================

HTML menu creator for Blade

1.1.0(7y ago)153MITPHP

Since Feb 21Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dnabeast/tabmenu)[ Packagist](https://packagist.org/packages/dnabeast/tabmenu)[ RSS](/packages/dnabeast-tabmenu/feed)WikiDiscussions master Synced 2mo ago

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

HTML menu creation for Laravel Blade
====================================

[](#html-menu-creation-for-laravel-blade)

This allows you to define your HTML menu system using easy to read syntax in a blade file.

It allows the menu urls to change if it's called from an admin directory.

Installing
==========

[](#installing)

Add the dependency to your project:

```
composer require DNABeast/tabmenu
```

\##Publish the config file

```
php artisan vendor:publish

```

### Laravel 5.5:

[](#laravel-55)

The ServiceProvider is automatically discovered.

### Laravel 5.2:

[](#laravel-52)

Add to your app.php config.

```
DNABeast\TabMenu\TabMenuServiceProvider::class,

```

You may need to clear the view cache

```
php artisan view:clear

```

Usage
=====

[](#usage)

In your blade file enter the custom @menu directive, and the @endmenu directive. Enter your menu as a text list. You can indent if you wish.

```
@menu
[tab][tab]Menu 1
[tab][tab]Menu 2
[tab][tab]Menu 3
@endmenu

```

outputs

```

	Menu 1
	Menu 2
	Menu 3

```

### Sub-menus

[](#sub-menus)

Add a tab and the menu item will become a sub-menu.

```
@menu
[tab][tab]Menu 1
[tab][tab][tab]Menu 1a
[tab][tab][tab][tab]Menu 1ax
[tab][tab]Menu 2
@endmenu

```

creates

```

	Menu 1
		Menu 1a
			Menu 1ax

	Menu 2

```

### Set URLs

[](#set-urls)

Put a comma and set the url when it's different to the menu name

```
@menu
Menu, /menu-one-location
Menu 2
@endmenu

```

becomes

```

	Menu
	Menu 2

```

### Set a Class

[](#set-a-class)

If your menu item requires a class name just add it after a second comma

```
@menu
Menu Item, /menu-item, action
@endmenu

```

becomes

```

	Menu Item

```

### Unwrap the primary ul tag

[](#unwrap-the-primary-ul-tag)

If you need to add manual menu items it's useful to be able to remove the wrapping &lt;ul&gt; tag.

Publish the config file

```
php artisan vendor:publish

```

and change the nowrap flag to true.

```
@menu
Menu Item, /menu-item, action
@endmenu

```

becomes

```
	Menu Item

```

### Change the tabs to spaces

[](#change-the-tabs-to-spaces)

I get it. You prefer pragmatism over semantics. You can change the tab to 2 spaces or 4 spaces if you like.

In the published config file type whatever your preferred indentation is.

```
'indent' => '----'

```

### Alter the prefix for admin links

[](#alter-the-prefix-for-admin-links)

In the published config file enter the name of your admin folder.

```
'prefix' => 'dashboard'

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~1 days

Total

2

Last Release

2638d ago

### Community

Maintainers

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

---

Top Contributors

[![dnabeast](https://avatars.githubusercontent.com/u/3229763?v=4)](https://github.com/dnabeast "dnabeast (24 commits)")

---

Tags

laravelblademenu

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dnabeast-tabmenu/health.svg)

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

###  Alternatives

[radic/blade-extensions

Laravel package providing additional Blade extensions: foreach (with $loop data like twig), break, continue, set,array (multiline), etc

271321.7k5](/packages/radic-blade-extensions)[electrik/slate

Slate - a Laravel Blade UI Kit is a set of anonymous blade components built using TailwindCSS v4 with built-in dark mode support for your next Laravel project

102.3k1](/packages/electrik-slate)

PHPackages © 2026

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