- What is capell-app/navigation used for?
- It is a menu and navigation builder for Laravel applications, letting you define hierarchical menus and links and render them anywhere in your site. It targets multilingual, multi-site setups and includes visual menus, nested links, active-state handling, ordering, and publish scheduling. You can define menus in code or store them in the database, then output them with Blade components. It is suited to projects that need more structure than hardcoded nav markup.
- How do I install capell-app/navigation with Composer?
- Install it with composer require capell-app/navigation, then publish any configuration or migration files the package ships if you plan to use database-backed menus. Because the README was not available at the time of writing, confirm the exact publish tags and migration steps against the package source before running them. After that, define your first menu in code or the database and render it with the provided Blade components.
- Which Laravel versions does this navigation package support?
- The package is built for Laravel, but the supported version range is defined by the illuminate constraints in its composer.json. Check that constraint on Packagist or in your vendor directory before installing. If your application runs an older or newer Laravel release, verify compatibility first, since menu and Blade component APIs can change between major versions. Running the package test suite against your Laravel version is the quickest confirmation.
- Should I define menus in code or in the database?
- Both approaches are supported, so the choice depends on who maintains the navigation. Code-defined menus suit small, developer-owned structures that change with deployments, while database-backed menus fit multi-site or content-managed setups where editors adjust links and ordering without a release. Hierarchical links, ordering, and publish scheduling apply in either case. Many projects start in code and move to the database as editorial needs grow.
- How do I render a menu with nested links in Blade?
- Menus are rendered through the package's Blade components, which handle nested links and ordering for you, so you do not write recursive markup by hand. You pass the menu you want to display and the component outputs the hierarchy with active-state handling applied. Because the components are standard Blade, you can wrap or extend the markup to match your design system. Check the package source for the exact component names and accepted props.
- How does multilingual navigation work?
- Capell App Navigation is built for multilingual sites, so menu labels and links can differ per locale rather than sharing a single set of strings. In practice you translate the menu item labels for each supported language and render the menu for the current application locale. This keeps navigation consistent with the rest of your localized content. The exact storage format for translations depends on whether you use code-defined or database menus.
- Can I use it across multiple sites in one Laravel installation?
- Yes, multi-site support is a core part of the package's design, so a single installation can hold separate navigation structures for different sites or brands. Each site can have its own menu hierarchy, links, and ordering while sharing the same rendering components. This is useful for Laravel applications that serve several domains or storefronts from one codebase. Confirm how site scoping is configured in the package before modelling your data.
- How are active states and link ordering handled?
- The package includes active-state handling and ordering as built-in features, so you do not need to compare the current route manually in every template. Ordering can be defined alongside your menu items, whether they live in code or the database, keeping the rendered sequence predictable. Active states are applied during rendering so the correct link is highlighted for the current request. If you need custom highlighting rules, you can extend the rendered markup in your Blade views.
- How does publish scheduling for navigation links work?
- Publish scheduling lets you set when a menu link becomes visible instead of publishing it manually at launch time. This is useful for campaign pages, seasonal sections, or staged content where navigation should change on a specific date. Scheduled items are typically filtered out of the rendered menu until their publish date is reached. Verify the exact field names and timezone behaviour in the package source before relying on it for time-critical launches.
- Can I test menus and is the package safe for production?
- Active-state and ordering logic are good candidates for feature tests, and database-backed menus can be exercised with an in-memory SQLite connection in your test suite. Before production use, pin a specific version in composer.json, review the package source since the repository and README details were not available, and add your own tests around the menus your application depends on. Also confirm that scheduled links behave as expected in your queue and timezone configuration.