Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Navigation Bundle

Navigation Bundle Laravel Package

rybakit/navigation-bundle

A Symfony bundle for building and rendering hierarchical navigation menus. Define menu trees, track the active item based on the current route, and output them in your templates with minimal setup. A lightweight way to keep site navigation organized and consistent across your application.

View on GitHub
Deep Wiki
Context7

rybakit/navigation-bundle is a Symfony bundle for defining, building, and rendering navigation menus in a clean, configuration-driven way. Menus are described declaratively (e.g. in YAML) and compiled into menu item objects, so you can manage complex navigation trees without scattering markup across templates.

Its standout feature is active-state detection: configurable matchers inspect the current request and mark the relevant item—and its ancestors—as active. Rendering is left to your templates, giving you full control over markup while the bundle handles the logic.

  • Declarative menu definitions via bundle configuration
  • Flexible request-based matchers for active item/ancestor detection
  • Nested menu items with attribute and child support
  • Twig-friendly rendering with no imposed markup
  • Seamless Symfony DI and service integration
Frequently asked questions about Navigation Bundle
Can I use rybakit/navigation-bundle in a Laravel application?
No. RybakitNavigationBundle is a Symfony bundle that registers services through a Symfony DI container, kernel event subscribers, and a Twig extension, none of which exist in Laravel's request lifecycle. There is no supported way to register its config tree or compiler passes in Laravel without writing a Symfony kernel shim, which defeats the purpose. For Laravel, reimplement the concept instead: a menu tree plus active-state resolution built with arrays or Eloquent models and rendered by a Blade component.
Which Symfony and PHP versions does rybakit/navigation-bundle support?
The last release was December 2017, which places it in the Symfony 3.x and PHP 7.0 to 7.2 era. Modern Symfony 5.4, 6.x, and 7.x will reject its composer.json constraints, and even with --ignore-platform-reqs the bundle class, service definitions, and Twig extension signatures predate several breaking changes. It is not compatible with current Symfony or Laravel stacks.
What does RybakitNavigationBundle actually do?
It lets a Symfony application define navigation menus in configuration and render them, including nested structures and active item detection, with Twig integration. The real content is a thin wrapper over a menu-tree abstraction plus active-trail resolution. Both pieces are small enough to hand-roll in a Laravel app in well under a day.
How do I install rybakit/navigation-bundle?
The normal path would be composer require rybakit/navigation-bundle, then registering the bundle in a Symfony kernel and importing its service configuration. Laravel has no kernel or bundle registration step, so the install is effectively unsupported there. Expect Composer constraint conflicts on modern PHP even before you reach the wiring stage.
Is rybakit/navigation-bundle still maintained?
No. There has been no maintainer activity for roughly eight years, the package has about 7 stars and 0 dependents, and there is no security response path. The MIT license lets you fork it, but you also inherit full ownership of fixes and framework upgrades. Zero dependents means there is no community pressure to resolve incompatibilities.
How does active menu item detection work in this bundle?
It resolves the active item and its trail of parents, typically by matching the current request against route or URL information declared in the menu configuration. That logic is the genuinely reusable idea in the package. The Laravel equivalent is a small resolver comparing the current route name against each item, plus a helper that marks ancestors active.
Can I use the bundle's menus with Blade instead of Twig?
The bundle ships a Twig extension, and Twig is not part of Laravel's default stack, so there is no Blade integration. Porting it would mean reimplementing the rendering layer anyway. At that point a Blade component with a recursive include is simpler and easier to test than a vendor fork.
What is a good Laravel alternative for navigation menus?
For most Laravel apps the answer is not a package at all: a config array or Eloquent-backed menu model, a resolver for active state and role or permission filtering, and a Blade component with recursive rendering. If you want an off-the-shelf option, pick an actively maintained Laravel menu package with recent releases and support for Laravel 10 or 11. Avoid Symfony bundles such as KnpMenu or this one unless you are actually running Symfony.
Is it risky to depend on an abandoned package like this?
Yes. The main risks are no security patch path, hidden coupling to framework internals that turns any later migration into a rewrite, and transitive Symfony component pins that can block upgrades. In absolute terms the risk is modest for a small rendering helper, but so is the payoff, which makes the trade clearly negative.
How much work is it to fork and modernize rybakit/navigation-bundle?
A realistic estimate is one to two weeks to vendor the source, raise Composer constraints, replace bundle bootstrapping with framework-native registration, patch API drift in the menu and tree classes, and add a compatibility layer, plus ongoing ownership. That buys functionality that costs less to write fresh. Unless a legacy or contractual requirement forces this exact package, a clean-room implementation is the better call.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo