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

Laravel Menus Laravel Package

nwidart/laravel-menus

Laravel Menus is a flexible menu builder for Laravel apps. Define menus and nested items in code, add links or routes, control ordering and active states, and render them with built-in or custom presenters. Supports Bootstrap-style markup and view partials for quick, maintainable navigation.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Confirm your app is on Laravel 8 and PHP 7.3+ before adopting v7. This major release is primarily a framework-compatibility release, so the fastest path is a clean install rather than an in-place major upgrade on an older Laravel version.
  • Install with composer require <vendor>/<package>:^7.0, then let Laravel's package auto-discovery register the service provider and facade aliases. If the package predates auto-discovery or you have extra.laravel.dont-discover configured, register the provider manually in config/app.php.
  • Publish package assets early: php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider". Review the published config file before writing application code; most day-to-day behavior is driven from there.
  • Look first at the package README and the v7 upgrade notes, then at the service provider to understand what is bound into the container and which config keys are read.
  • First use case: wire the package into a single controller or artisan command behind a feature flag. Resolve the package's main class from the container (constructor injection) rather than instantiating it directly, so you inherit the package's configured dependencies.

Implementation Patterns

  • Constructor injection over facades. Inject the package's contracts/classes into controllers, jobs, and listeners. This keeps tests swappable and avoids facade root resolution issues in queued contexts.
  • Configuration as the integration seam. Keep environment-specific values in config/<package>.php and .env; avoid passing credentials or endpoints at call sites. Cache config in production with php artisan config:cache as part of deploy.
  • Wrap third-party calls in your own service. Create a thin application-level adapter around the package so a future major upgrade only touches one class. This is especially valuable across major version bumps.
  • Queue long-running work. If the package performs HTTP calls, file operations, or notifications, dispatch a job that uses the package rather than calling it inside a web request.
  • Test against the package boundary. Use RefreshDatabase for any published migrations, fake the package's client where possible, and assert on your adapter's output rather than package internals.
  • Upgrade workflow for v7: pin ^7.0, run composer update <vendor>/<package> --with-dependencies, re-publish config with --force only after diffing, run php artisan migrate, then clear caches (config:clear, route:clear, view:clear). Run the full test suite against Laravel 8 before merging.
  • Integration tips: bind package interfaces in a dedicated app service provider when you need custom implementations; use events/listeners if the package dispatches lifecycle events; keep published migrations timestamped after existing app migrations.

Gotchas and Tips

  • Major version = breaking surface. Even when the headline is "Laravel 8 support," v7 may drop older Laravel/PHP constraints or rename config keys and namespaces. Read the full changelog between your current version and 7.0, not just the release note.
  • Config cache staleness. After publishing or editing package config, run php artisan config:clear locally and ensure config:cache runs during deploy. Stale cached config is the most common "it works locally" failure.
  • Auto-discovery cache. If the provider or aliases do not appear, check bootstrap/cache/packages.php and run php artisan package:discover. Remove stale entries after upgrading.
  • Published file collisions. Re-publishing config or migrations may overwrite local edits; always diff before using --force, and keep customization in your own config layer where possible.
  • Version constraint diagnosis. Use composer why-not <vendor>/<package> 7.0 to find the dependency blocking Laravel 8 adoption, and check whether transitive packages also need Laravel 8-compatible releases.
  • Facade aliases and class names. If you upgrade from an older major, search your codebase for the package's old namespace and facade alias; aliases are a frequent silent breakage.
  • Serialization in queues. Objects from the package may not survive queue serialization across versions. Prefer passing scalars/IDs into jobs and resolving the package inside handle().
  • Extension points. Prefer the package's documented contracts, events, and config over subclassing internals. If you must extend, isolate it in one adapter class and cover it with a test so the next major release is a contained change.
  • Debugging: enable package debug logging if available, reproduce with a tinker session (php artisan tinker) resolving the class from the container, and confirm the resolved config with config('<package>.key') before assuming a code bug.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core