jeffersongoncalves/filament-amplitude
Filament Amplitude integrates Amplitude analytics with your Filament admin panels, making it easy to track events, user behavior, and custom metrics directly from Filament resources with minimal configuration.
filament-analytics-core ^3.1 (or the version constraint that ships Plugin::make()->navigationGroup()); pin it explicitly in composer.json rather than letting the plugin resolve whatever is already locked, or the method simply won't behave as documented.public function panel(Panel $panel): Panel
{
return $panel
->plugin(Plugin::make());
}
src/Plugin.php or the package's Plugin namespace) — it is the single surface you configure. Everything day-to-day happens through Plugin::make() chained before ->plugin() hands it to the panel.Settings, Reporting, Administration) and the plugin's page lands in a separate translated group. Add ->navigationGroup('Settings') and it slots in with the rest of your settings pages instead of creating a one-item group.Static group for a single panel. The common case — consolidate the plugin page into an existing group by name:
->plugin(
Plugin::make()->navigationGroup('Settings')
)
Match the string to the label your other resources already use. If your panel groups by translation key, pass the same key (see Gotchas).
Dynamic / per-tenant grouping with a Closure. Because the argument is string|Closure, you can resolve the group at render time — useful when tenants, roles, or panels localise their navigation differently:
Plugin::make()->navigationGroup(
fn () => auth()->user()?->isAdmin() ? 'Administration' : 'Settings'
)
Keep the closure cheap and side-effect free; it can be evaluated during navigation building on every page render.
Multi-panel parity. Plugin registration is per panel, so call navigationGroup() on each panel that registers the plugin. Panels that omit it keep the package's translated default group — which is a perfectly valid mixed setup if only your admin panel needs consolidation.
Opting back into the default. Omitting the call is the documented way to retain the translated group. Don't pass an empty string expecting a fallback; treat "not set" and "set to a value" as the only two intentions.
Pair with your own ordering. navigationGroup() only assigns the group; where the page lands within it is governed by the panel's normal sorting conventions. Treat grouping and ordering as two separate configuration steps and set both deliberately.
filament-analytics-core, navigationGroup() may be missing entirely (fatal BadMethodCallException) or present but ignored. After upgrading the plugin, run composer update filament-analytics-core and confirm the resolved version before debugging anything else.'Settings' and 'settings' and 'Settings ' produce three groups. If a page spawns its own group, diff the strings before suspecting the plugin.__() conventions. If your other resources use translation keys as group identifiers, pass the key — otherwise the plugin page will group separately in non-default locales.string; returning null is not the documented "keep default" escape hatch — omit the call instead. Guard against unauthenticated contexts (queue jobs, artisan commands, login page) where auth()->user() is null.php artisan filament:optimize-clear, php artisan config:clear, and php artisan optimize:clear before concluding the setting isn't applied.navigationGroup() actually called on the panel in use → string matches an existing group exactly → caches cleared. That sequence resolves nearly every report of "the page is still in the wrong group."Plugin.php first; the closure signature is the intended seam and is stable, whereas internal properties are not.navigationGroup() behave identically. There is no migration or config republish required, so keep the upgrade scoped to the dependency bump and add grouping as an explicit follow-up change.How can I help you explore Laravel packages today?