hieu-le/active
Laravel helper for detecting the active state of routes URLs and requests, making it easy to highlight the current menu item, tab, or link in your navigation. Provides simple isActive methods and Blade-friendly checks with flexible pattern matching.
archived: yes, last release: 2022-03-10, and dependents: 0. A 9.0.0 release is direct evidence that at least one of those signals is now stale. The live decision is no longer "vendor it"; it is "re-verify the maintenance posture before we spend the sprint vendoring." That re-verification is cheap (minutes) and the wrong call is not (either we vendor code we didn't need to own, or we adopt a package we can't trust).aria-current="page" / aria-current="true"). Any 9.x adoption still requires us to decide whether active state is a CSS class, a semantic attribute, or both — and to make that a shared contract rather than 40 hand-rolled conditionals. This decision must not be deferred on the basis of the release being new..is-active, [aria-current]) or a literal string scattered through Blade. Cheap to fix now, expensive after 200 templates — and unchanged by any release.admin.*, settings.*) so a child page keeps its parent section highlighted. Route-pattern matching remains the lever for that UX decision — and for scoping how far matching logic grows before it becomes a homegrown router. A 9.0.0 major could plausibly change these matching semantics; assume it might until proven otherwise.Verification gate (do this first — it supersedes the criteria below): Because 9.0.0 shipped with empty release notes, confirm before any decision: (1) is the repository still archived, or has maintenance resumed; (2) what the 9.0.0 changelog actually contains — breaking changes, minimum PHP/Laravel, renamed APIs; (3) current dependent count and issue-response activity; (4) whether a 9.x support/security-patch posture exists. Until (1)–(4) are answered, hold the "vendor it" recommendation.
Consider it when:
request()->routeIs() conditionals.aria-current) output or configurable state tokens and 9.0.0 supplies them; that would materially change the calculus in the package's favour.Look elsewhere (or build the 20-line version) when:
request()->routeIs(), Route::is(), and @class cover most of the same ground natively.aria-current semantics and the new major doesn't provide them; you'll be wrapping or rewriting output anyway.Adoption criteria, in short: Gate cleared + Blade + named routes + supported framework line + documented breaking changes = reasonable. Gate unclear = hold. Anything else = lift the logic, drop the package.
For executives: A new major version (9.0.0) of this utility shipped, which invalidates the headline of our last review — we had it recorded as archived and unmaintained since 2022. We are not recommending adoption on the strength of a version number. The release arrived without notes, so we cannot say what changed or what it breaks, and a major bump can mean anything from a rename to a rewrite. The business-relevant facts are unchanged: this is a tiny, MIT-licensed helper answering one question — "which nav item is the user on?" — and it is not a platform bet. The decision is paused for a short verification (confirm maintenance status and read the changelog), after which we either adopt a maintained package or spend well under a developer-day vendoring the matching logic and dropping the dependency. Either outcome is cheap; what we will not do is let an undocumented major release enter the stack on the assumption that "newer is better." Expected cost to resolve: under a day. Expected benefit: one fewer unowned dependency gating framework upgrades, plus a consistent, accessible "you are here" treatment across the product.
For engineering: 9.0.0 is published with empty release notes. Do not upgrade blind. Actions, in order: (1) confirm whether the repo is still archived and whether 9.0.0 is a real maintenance resumption or a one-off tag; (2) pull the changelog/diff and enumerate breaking changes, minimum PHP/Laravel, and any API renames; (3) re-check dependents and issue activity to gauge whether 9.x will be supported forward. If it clears: upgrade behind a pin, and vendor our wrapper so the package's surface stays narrow — app/Support/ActiveState, configurable token output plus aria-current, tests covering wildcard/parent-trail and multi-tenant route prefixes. If it doesn't clear: extract the matching logic from the pinned source, add the same tests, remove the Composer dependency. Either path, pair it with a one-time sweep removing ad-hoc routeIs() conditionals from Blade so there is one source of truth.
For design/product: Nothing about the design decision changes with this release. The upside is still consistency — every nav, tab bar, and settings sub-menu behaving the same, including parent-section highlighting on child pages — and it only lands if we define active state once: a token (.is-active / [aria-current]) that design owns, not a literal class string sprinkled through templates. The one product-facing caveat: if 9.0.0 changed how states are emitted, we should confirm the contract with engineering before designers spec against it. Otherwise this remains a low-cost opportunity to make navigation legible and accessible without new headcount or new tooling.
How can I help you explore Laravel packages today?