Weave Code
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
Menu Bundle

Menu Bundle Laravel Package

symfony-cmf/menu-bundle

Symfony CMF MenuBundle integrates dynamic, CMS-driven navigation into Symfony apps, building menus from content repositories with rich node metadata. Provides menu rendering, routing-aware items, and admin-friendly structure for complex site navigation.

View on GitHub
Deep Wiki
Context7

Extends the KnpMenuBundle to work with PHPCR ODM

Frequently asked questions about Menu Bundle
Can I use Symfony CMF MenuBundle in Laravel without Symfony’s full stack?
No, this bundle is designed for Symfony and relies on its DI container, PHPCR (a NoSQL database), and KnpMenuBundle. Laravel’s service container and Eloquent ORM would require significant abstraction layers or custom providers to integrate it, making alternatives like spatie/laravel-menu more practical.
What Laravel versions support Symfony CMF MenuBundle?
This bundle is not officially supported in Laravel. It targets Symfony 2.8–4.0 and PHP 7.1–7.2. Integration would require manual bridging (e.g., service providers) and may conflict with Laravel’s architecture, especially in newer versions (Laravel 9+).
Is PHPCR (the database behind this bundle) compatible with Laravel?
PHPCR is a document-oriented database incompatible with Laravel’s SQL-first Eloquent ORM. You’d need to manually configure PHPCR’s ODM in Laravel, manage schema-less data, and handle potential conflicts with Laravel’s migrations or query builder. Consider MongoDB via jenssegers/laravel-mongodb instead.
How do I create dynamic menus in Laravel without Symfony CMF MenuBundle?
Use Eloquent models with `parent_id` for hierarchical menus, then render them in Blade with recursive includes. For caching, leverage `php artisan route:cache` or Redis. Packages like spatie/laravel-menu offer active maintenance and Laravel-native menu building with less overhead.
Why is this bundle abandoned? Should I still use it?
The bundle is unmaintained, with the Symfony CMF project shifting focus to routing components. Unless you’re tied to PHPCR or Symfony’s ecosystem, avoid it. Active Laravel alternatives (e.g., spatie/laravel-menu) are safer for long-term projects. Forking risks introduce maintenance burdens.
Can I migrate from Symfony CMF MenuBundle to a Laravel-native solution?
Yes, but it requires effort. Audit your menu logic, document PHPCR dependencies, and test a parallel Eloquent-based menu system. Start with static menus in Blade, then migrate dynamic ones to spatie/laravel-menu. Phase out PHPCR if unused elsewhere.
Does this bundle work with Laravel’s Blade templating?
Indirectly, but poorly. The bundle relies on KnpMenuBundle’s Symfony Twig integration, which won’t natively work in Laravel’s Blade. You’d need custom Blade directives or middleware to render menu data from PHPCR, adding complexity. Native Laravel solutions (e.g., Blade + Eloquent) are simpler.
What are the performance implications of using PHPCR in Laravel?
PHPCR’s document model may underperform for large-scale menus compared to Laravel’s optimized SQL queries. Test with your expected load (e.g., 10K+ items) and benchmark against Eloquent or spatie/laravel-menu. Caching (Redis) can mitigate some latency, but PHPCR’s lack of Laravel integration adds overhead.
Are there alternatives to Symfony CMF MenuBundle for Laravel?
Yes. For dynamic menus, prioritize spatie/laravel-menu (active maintenance, Laravel-native). For hierarchical data, use Eloquent with `parent_id` or staudenmeir/eloquent-eager-limit. Static menus can leverage Laravel’s route caching and Blade. Avoid Symfony bundles unless PHPCR is critical.
How do I handle menu routing in Laravel if I use Symfony CMF MenuBundle?
The bundle uses Symfony’s UrlGenerator, which won’t work in Laravel. Replace it with Laravel’s `route()` helper in Blade or middleware. Ensure menu items generate Laravel-compatible URLs (e.g., `route('home')` instead of Symfony’s `path()`). This requires custom logic or forking the bundle.
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.
anousss007/vigilance
supportpal/eloquent-model
ardenexal/fhir-models
laravel-at/laravel-image-sanitize
romalytar/yammi-audit-log-laravel
ardenexal/fhir-validation
arshaviras/weather-widget
laravel-chronicle/core
sunchayn/nimbus
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon