arcanedev/laravel-active
Laravel Active provides helpers to detect the current route or URL and mark matching navigation links, menus, and tabs as active, with support for patterns and exclusions. A small utility package by ArcaneDev for building state-aware navigation in Laravel applications.
admin.users.*) or URL paths (/admin/users/*) is a design decision, not just an implementation detail. Name-based matching survives URL restructuring and localization prefixes; path-based matching survives route renames. Deciding this early prevents a nav rewrite later when you add locale prefixes, tenant slugs, or versioned APIs.aria-current="page" / aria-current="section" gets emitted. If accessibility is on the roadmap or in a compliance requirement, this is a shared-component concern, not a per-view concern — worth deciding once and standardizing.Consider it only when all of the following hold:
admin.*, settings/*) without designing it, and the exact semantics of those patterns fit your route naming conventions.Look elsewhere — or, more likely, write it in-house — when:
To executives: This is a tiny utility that highlights the current page in navigation. It is not a strategic dependency, it carries essentially no cost either way, and it is not worth a procurement or architecture debate. Our recommendation is to implement the equivalent as a small internal helper (roughly half a day of engineering, including tests and an accessibility pass) rather than adopt a package with three GitHub stars, no downstream users, and no release since early 2022. The upside of owning it is that we control the matching rules when we add localization prefixes or tenant-specific URLs; the downside is negligible.
To engineering: The capability is real and worth standardizing — a single shared helper plus a Blade component so nav, tabs, and breadcrumbs all derive active state the same way and emit aria-current correctly. The library in question is a reasonable reference implementation for wildcard/pattern matching, but given its age and adoption profile, treat it as prior art rather than a dependency. Copy the idea, write ~50 lines against your own route naming conventions, cover it with a handful of tests, and revisit only if your needs grow beyond pattern matching — at which point the right answer is probably a front-end router, not a bigger PHP helper.
How can I help you explore Laravel packages today?