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

Filament Topbar Menu Laravel Package

vaslv/filament-topbar-menu

A Filament 5 plugin that adds a configurable topbar menu right after the logo, linking to external URLs or named Laravel routes with nested dropdowns, icons and favicons, visibility rules, automatic caching, a full resource with drag-and-drop reordering, a responsive mobile panel, and 13 bundled tra...

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is structurally well-behaved for a Filament plugin: it registers through PanelProvider::plugin(), renders exclusively through official panel render hooks (PanelsRenderHook::TOPBAR_LOGO_AFTER, TOPBAR_START, and configurable overrides), and rebuilds its UI from Filament's own fi-topbar-nav-groups / fi-sidebar markup rather than shipping a bespoke layout or asset bundle. There are no layout overrides and nothing to compile, which is the right shape for something that sits in the chrome of every panel page. The trade-off is that "no assets to build" is achieved by depending on Filament's precompiled theme.css internals — the README openly documents the three CSS rules it ships specifically because Filament's utilities don't cover an arbitrary element on desktop. That is a coupling to non-contractual class names (fi-topbar-start, fi-body-has-topbar, fi-sidebar) and should be treated as the package's primary architectural risk, not the DB table.

The package is also stateful: it ships a migration, a model, an admin resource, a view page, and a cache layer. That is a materially different footprint from a config-only link list — it means schema ownership, migrations in your deploy pipeline, and a navigation surface for content editors.

Integration feasibility. Install cost is genuinely low: composer require, php artisan migrate, one ->plugin() call. Realistic effort for a developer already on Filament 5 is a half-day including verification, most of it spent on the responsive check below lg (1024px), where a second copy of the menu renders as its own slide-in sidebar with its own button next to the ☰. Optional vendor-publish of migration/config/views exists for teams that don't want bundled files.

Technical risk.

  • Ecosystem immaturity. Filament 5 is new, and the package pins ^5.0 only. 10 stars and 0 dependents means there is effectively no downstream validation — your panel may be the largest consumer of this code.
  • Bus factor. Single maintainer. Mitigating signal: AGENTS.md shows real engineering discipline — pinned CI matrix (PHP 8.2/8.3/8.4, --prefer-lowest, MySQL 8 + PostgreSQL 16, one leg without ext-intl), protected main, changelog-before-tag release sequencing, and an explicit note that a prior SSRF hole reached a release because filter_var() classifies ::ffff:127.0.0.1 differently across PHP minor versions. That last item is the most important line in the docs: favicon resolution is a server-side fetch, and it has been exploitable before.
  • Silent failure modes. A named route that no longer exists → item skipped. A third-level item → kept in the table but never rendered. A parent whose children are all hidden → degrades to its own link or disappears. All graceful at runtime, all invisible to the editor. Deleting a parent cascades its children at the DB level with no confirmation, which is a content-loss footgun for non-technical users.
  • Driver-specific SQL. Hand-written scopeTreeOrdered() plus driver-aware migrations; SQLite tolerates shapes MySQL rejects. Your CI must cover your actual production engine if you fork.
  • ext-intl degradation. Without it, hide_on_current_domain stops matching internationalized domains and IDN favicons cannot resolve — quietly.

Key questions. Does the org actually need a DB-backed, editor-managed menu, or would a Blade partial with a handful of route links satisfy the requirement without a table, a resource, and a cache? Which panels get the resource (public panels should use ->resource(false))? Who is allowed to edit menu items, and does that audience justify the SSRF surface of favicon fetching? Is two-level nesting sufficient for the foreseeable nav plan, or will someone create a third level and file a "menu item disappeared" bug? What is the exit plan if a Filament 5.x bump breaks the fi-* markup — fork to a path repository, or drop the package?

Integration Approach

Stack fit. Qualified yes, scoped to Filament 5 panels on PHP 8.2+. Everything else is out of scope: on Filament 3/4 this is a hard no until a panel upgrade lands, and for non-Filament Blade apps it is irrelevant.

Migration path. Greenfield panels are trivial — install, migrate, seed the bundled demo tree (TopbarMenuSeeder is idempotent, matched by parent + label, and skips the role-restricted example unless your user model exposes hasAnyRole()), then replace demo rows with real ones. Retrofits need a visual audit against any existing topNavigation() groups: the package deliberately mirrors Filament's native group behavior (parent toggle is a pure toggle, its own url ignored while children are visible), so duplication and double-highlighting are the things to look at. The README names the specific conflict case — a panel that moved the desktop menu to TOPBAR_END and un-hid .fi-topbar-nav-groups will show both copies below lg unless ->mobile(false) is set.

Compatibility. Verified against MySQL 8 and PostgreSQL 16; PHP 8.2–8.4; ext-intl optional but recommended. Two operational caveats: flipping FILAMENT_TOPBAR_MENU_VIEW_PAGE requires re-running php artisan route:cache (the package degrades to "View page unavailable" rather than throwing, which is the right call), and ->mobileSidebar() is inert on panels with navigation(false) since there is no sidebar to append to.

Sequencing.

  1. Spike in a non-production panel; pin an exact version in composer.json rather than floating ^.
  2. Decide resource exposure per panel (->resource(false), resourceNavigationGroup(), resourceNavigationSort()), and gate the resource behind the same policy that guards other settings screens.
  3. Deploy the migration as a purely additive step in a normal release window — new table, no changes to existing schema.
  4. Provision items via a seeder or TopbarMenuItem::create() calls committed to the repo, not by clicking in production. This makes environments reproducible and keeps the menu in code review.
  5. Explicitly test at <1024px: button placement, backdrop layering below the topbar, Esc/backdrop close, and dark mode.
  6. Add your own smoke check (even a Playwright assertion that the topbar menu element exists at both breakpoints) — upstream CI cannot see your theme.
  7. Establish an upgrade gate: any Filament minor bump triggers a manual pass over the topbar and mobile sidebar.

Operational Impact

Maintenance. You are taking a dependency on a one-person package with no dependents. Budget for the possibility of vendoring it (Composer path repository) within a release or two. The release discipline visible in AGENTS.md is a genuine positive — changelog-before-tag, protected main, a CI matrix that covers the axes that have historically broken it — but discipline from one maintainer is not the same as a support contract.

Support. No community to escalate to; GitHub issues are the only channel. Internal knowledge should be concentrated in at least two engineers, and the "how do I add a menu item / why did my item vanish" answer should live in an internal runbook, not a link to the README.

Scaling. Read path is the strong point: the menu is cached and performs no database query per render, so page cost is flat regardless of item count or traffic. Write path is admin-only and low volume; the cached tree is flushed on changes through the resource. The residual scaling concern is cache invalidation completeness — if items are ever written outside the resource (imports, direct writes, the documented roles import path), confirm model events flush the cache, or you will ship a stale menu that looks like a rendering bug.

Failure modes to plan for.

  • Filament theme change → topbar classes shift → menu visually breaks or disappears without an exception. Highest-likelihood, highest-annoyance failure.
  • Deleting a parent group silently deletes its children — no confirmation, DB cascade.
  • Third-level items remain in the table but never render; editors perceive data loss.
  • Missing ext-intl → IDN visibility rules and favicons degrade silently.
  • Favicon fetch SSRF — restrict resource access to trusted admins and consider an allowlist or disabling favicon URLs entirely if the editor population is broad.
  • Named-route deletion and stale route cache both degrade gracefully (item skipped / View page reported unavailable), which is a credit to the design.

Ramp-up. Developer: ~1–2 hours to install, register, seed, and verify both breakpoints; ~30 minutes more to read the responsive-behavior section properly. Content editor: the resource follows Filament conventions and the read-only View page is a real aid — but the two-level depth cap and the cascade-delete behavior need a short written policy, because both fail silently and neither is recoverable through the UI. On-call/support: needs to know that the menu is DB + cache, that php artisan route:cache interacts with the View-page toggle, and that "menu item missing" is most often a visibility rule or a third-level nesting mistake rather than an outage.

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package