PHPackages                             honda/navigation - 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. honda/navigation

Abandoned → [felixdorn/laravel-navigation](/?search=felixdorn%2Flaravel-navigation)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

honda/navigation
================

navigation

0.2.1(4y ago)01.4kMITPHPPHP ^8.0

Since May 14Pushed 3y agoCompare

[ Source](https://github.com/laravel-honda/navigation)[ Packagist](https://packagist.org/packages/honda/navigation)[ Docs](https://github.com/honda/navigation)[ RSS](/packages/honda-navigation/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (8)Versions (7)Used By (0)

Navigation for Laravel
======================

[](#navigation-for-laravel)

[![Tests](https://github.com/laravel-honda/navigation/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/laravel-honda/navigation/actions/workflows/tests.yml)[![Formats](https://github.com/laravel-honda/navigation/actions/workflows/formats.yml/badge.svg?branch=master)](https://github.com/laravel-honda/navigation/actions/workflows/formats.yml)[![Version](https://camo.githubusercontent.com/0b9d31bbc6e884e427e50b19f54bfa13cf14737fdba7f9172e1836913f08697d/68747470733a2f2f706f7365722e707567782e6f72672f686f6e64612f6e617669676174696f6e2f76657273696f6e)](//packagist.org/packages/honda/navigation)[![Total Downloads](https://camo.githubusercontent.com/43d35c6bbc00bede6886fb5bb8feb1d5702aeaafbf4cd6b4242a1281acc03e89/68747470733a2f2f706f7365722e707567782e6f72672f686f6e64612f6e617669676174696f6e2f646f776e6c6f616473)](//packagist.org/packages/honda/navigation)[![License](https://camo.githubusercontent.com/964673a785c0729e7f047cde79803ed0253ba3005e31ba34a682ee01f0e1c083/68747470733a2f2f706f7365722e707567782e6f72672f686f6e64612f6e617669676174696f6e2f6c6963656e7365)](//packagist.org/packages/honda/navigation)

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

[](#installation)

> Requires [PHP 8.0+](https://php.net/releases)

You can install the package via composer:

```
composer require honda/navigation
```

Usage
-----

[](#usage)

### Creating a navigation bar

[](#creating-a-navigation-bar)

```
use Felix\Navigation\Navigation;

Navigation::macro('theName', function (Navigation $navigation) {
    // ...
});
```

### Rendering a navigation bar

[](#rendering-a-navigation-bar)

```
use Felix\Navigation\Navigation;

Navigation::theName();
```

### Items

[](#items)

#### Href

[](#href)

If you pass a route name like `login` or `articles.index`, the actual path will be resolved. You may pass additional context to the route resolver.

If you pass anything else, it will be rendered as-is.

```
$item->href('articles.index');
```

```
$item->href('articles.edit', ['article' => 1]);
```

```
$item->href('https://repo.new');
```

#### Icon

[](#icon)

This package integrates seamlessly with [Blade Icons](https://github.com).

```
$item->icon('heroicon-eye');
```

#### Force active state

[](#force-active-state)

This will bypass a potentially defined active pattern and force the item to be rendered as an active one.

```
$item->alwaysActive();
```

#### Active pattern

[](#active-pattern)

Mark an item as active based on an advanced pattern. The resolved route path is used if no active pattern is provided. Check out [URL Pattern Matcher](https://github.com/laravel-honda/url-pattern-matcher) for more details.

```
$item->activePattern('/articles/*');
```

#### Conditionally rendered items

[](#conditionally-rendered-items)

```
use Felix\Navigation\Item;

$navigation->addIf($isAdmin, 'Settings', function (Item $item) {
    // ...
});
$navigation->addUnless($isReader, 'Articles', function (Item $item) {
    // ...
});
```

### Section

[](#section)

#### Add a section

[](#add-a-section)

```
use Felix\Navigation\Item;
use Felix\Navigation\Section;

$navigation->addSection('Name', function (Section $section) {
    $section->add('Child', function (Item $item) {
        // ...
    });
});
```

#### Conditionally rendered sections

[](#conditionally-rendered-sections)

```
use Felix\Navigation\Section;

$navigation->addSectionIf($isAdmin, 'Admin', function (Section $section) {
    // ...
});
$navigation->addSectionUnless($isReader, 'Bookmarks', function (Section $section) {
    // ...
});
```

### Blade Components

[](#blade-components)

> We provide a component called ``, feel free to use it as-is (needs AlpineJS to be fully functional).

```
// app/View/Components/Topbar.php
use Felix\Navigation\Components\Component;
class Topbar extends Component {
    public function viewName() : string{
         return 'components.topbar';
    }
}
```

You get access to an `$items` variables that contains a `Navigation` object.

Now in your views :

```

```

Testing
-------

[](#testing)

```
composer test
```

**Navigation for Laravel** was created by **[Félix Dorn](https://twitter.com/afelixdorn)** under the **[MIT license](https://opensource.org/licenses/MIT)**.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.2% 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 ~45 days

Total

5

Last Release

1694d ago

### Community

Maintainers

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

---

Top Contributors

[![felixdorn](https://avatars.githubusercontent.com/u/55788595?v=4)](https://github.com/felixdorn "felixdorn (37 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")

---

Tags

navigationhonda

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/honda-navigation/health.svg)

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

###  Alternatives

[illuminate/support

The Illuminate Support package.

630113.0M41.2k](/packages/illuminate-support)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/container

The Illuminate Container package.

31182.0M2.4k](/packages/illuminate-container)[illuminate/collections

The Illuminate Collections package.

27078.0M1.1k](/packages/illuminate-collections)[illuminate/config

The Illuminate Config package.

10944.5M2.5k](/packages/illuminate-config)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)

PHPackages © 2026

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