PHPackages                             vladdubzcom/kodinavigation - 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. vladdubzcom/kodinavigation

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

vladdubzcom/kodinavigation
==========================

The KodiCMS Support package. Fork for php8.4

v2.0.1(1mo ago)079↑322.2%1MITPHPPHP ^8.1

Since May 28Pushed 1mo agoCompare

[ Source](https://github.com/vladdubzcom/KodiNavigation)[ Packagist](https://packagist.org/packages/vladdubzcom/kodinavigation)[ Docs](http://kodicms.com)[ RSS](/packages/vladdubzcom-kodinavigation/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (3)Used By (1)

Laravel navigation class
========================

[](#laravel-navigation-class)

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

[](#installation)

1. Require this package in your composer.json and run composer update:

    `composer require kodicomponents/navigation`
2. After composer update, insert service provider `KodiComponents\Navigation\NavigationServiceProvider::class,` before `Application Service Providers...` to the `config/app.php`

**Example**

```
	...
	/*
	 * Navigation Service Provider
	 */
	KodiComponents\Navigation\NavigationServiceProvider::class,

	/*
	 * Application Service Providers...
	 */
	App\Providers\AppServiceProvider::class,
	...
```

Using
-----

[](#using)

```
$navigation = new \KodiComponents\Navigation\Navigation([
	[
		'title' => 'Test',
		'icon' => 'fa fa-user',
		'priority' => 500,
		'url' => 'http://site.com',
		'pages' => [
			[
				'title' => 'Test3',
				'icon' => 'fa fa-user',
				'url' => 'http://site.com',
			],
		],
	],
	[
		'title' => 'Test1',
		'icon' => 'fa fa-user',
		'priority' => 600,
		'url' => 'http://site.com',
	],
]);

// Setting pages from array
$navigation->setFromArray([
	[
		'title' => 'Test',
		'icon' => 'fa fa-user',
		'priority' => 500,
		'url' => 'http://site.com',
		'pages' => [
			[
				'title' => 'Test3',
				'icon' => 'fa fa-user',
				'url' => 'http://site.com',
			],
		],
	],
	[
		'title' => 'Test1',
		'icon' => 'fa fa-user',
		'priority' => 600,
		'url' => 'http://site.com',
	],
]);

// Setting page with method addPage(array|string|\KodiComponents\Navigation\Contracts\PageInterface)

$newPage = $navigation->addPage('New page');
$subPage = $newPage->addPage('Sub page');

$subPage->setPages(function(PageInterface $page) {
	$page->addPage(...);
	$page->addPage(...);

	$page->addPage(...)->setPages(function(PageInterface $page) {
		...
	});
});

$page = new \KodiComponents\Navigation\Page();

$page->setTitle(...);
$page->setIcon(...);
$page->setId(...);

$subPage1 = $newPage->addPage($page);

$navigation->getPages()->push($page);

$navigation->getPages()->prepend($page);

// Child pages
$page->getPages(); // Get sub pages
$navigation->getPages(); // Navigation pages

// Count pages
$navigation->countPages();

// Get first page
$page = $navigation->getPages()->first();

// get sub pages
$page->getPages(); // return KodiComponents\Navigation\PageCollection

// Count sub pages
$page->countPages();

// get parent page
$page->getParent();

// check if page has child
$page->hasChild();
$page->isChildOf($navigation);

// get title
$page->getTitle();

// get icon
$page->getIcon();

// get id
$page->getId();

// get utl
$page->getUrl();

// get path
$page->getPath(); // return array ['first page title', 'second page title', 'current page']

// get priority
$page->getPriority();

// check is active
$page->isActive();

// to array
$navigation->toArray();
$page->toArray();
```

### Searching

[](#searching)

```
// by path
$navigation->getPages()->findByPath('Page 1/Page 2/Page 3');

// or for page
$page->getPages()->findByPath('Page 1/Page 2/Page 3');

// by id

$page = new \KodiComponents\Navigation\Page();
$page->setId('page_id');

$navigation->addPage($page);
$navigation->getPages()->findById('page_id'); // return Page | null

$subPage = $navigation->addPage('Test page without id');
$subPage->addPage('Test subpage without id');

$navigation->getPages()->findById(md5('Test page without id/Test subpage without id'));
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance89

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% 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 ~0 days

Total

2

Last Release

57d ago

### Community

Maintainers

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

---

Top Contributors

[![butschster](https://avatars.githubusercontent.com/u/773481?v=4)](https://github.com/butschster "butschster (28 commits)")[![daaner](https://avatars.githubusercontent.com/u/9641698?v=4)](https://github.com/daaner "daaner (7 commits)")[![ryankilf](https://avatars.githubusercontent.com/u/7476235?v=4)](https://github.com/ryankilf "ryankilf (1 commits)")

---

Tags

laravelmenunavigationkodicms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vladdubzcom-kodinavigation/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[kodicomponents/navigation

The KodiCMS Support package.

12239.0k11](/packages/kodicomponents-navigation)[caffeinated/menus

Laravel Menus

132160.6k5](/packages/caffeinated-menus)[kodicomponents/support

The KodiCMS Support package.

10262.8k12](/packages/kodicomponents-support)[awes-io/navigator

🧿 Build navigation or menu for Laravel and Awes.io. Unlimit complexity and depth of the menu.

4922.8k](/packages/awes-io-navigator)

PHPackages © 2026

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