schmeits/filament-pan-analytics-widget
A Filament dashboard widget for Pan Analytics that brings visitor and page-view insights into your Laravel admin panel. View traffic trends and top pages without leaving Filament.
This is a Filament dashboard widget that surfaces Pan Analytics data inside admin panels. The 5.0.0 release is a platform-modernization release: it drops Filament 3 (held on the 4.x branch), pins to Filament 4/5, Laravel 12/13, and PHP 8.3–8.5, and simultaneously strips unused public surface area (facade, FilamentPanAnalyticsWidget class, testing mixin, stubs, view namespace, install command). The net effect is a leaner, better-tested package with a narrower supported platform window.
Architecture fit. Well-aligned if we are on — or willing to be on — the latest Laravel/PHP/Filament line. The package is consolidating to plugin-only configuration (registration via plugin, behavior via fluent setters like ->authorize()), which fits Filament's idiomatic extension model. Removal of the view namespace and asset pipeline means no custom view overrides and no JavaScript — acceptable for a read-mostly analytics widget, but it closes off white-labeling and deep UI customization. The new authorize(bool|Closure) and current() accessors are genuine architectural improvements for multi-panel, role-gated admin surfaces.
Integration feasibility. Straightforward for greenfield or recently-modernized Filament 4/5 apps: register the plugin, optionally pass an authorization strategy, done. For existing Filament 3 apps this release is not adoptable in isolation — we must either remain on the 4.x branch or complete a Filament 3→4 migration first. The removed install command shifts onboarding to manual provider/plugin registration, which is a small but real friction delta for new adopters.
Technical risk. Moderate, concentrated in a few areas: (1) the getSearchable() → isSearchable() rename is a mechanical but silent-breaking change; (2) removal of the "all" page-size option is a behavior change users will notice, especially anyone who depended on viewing full datasets; (3) current() returning null on panels without the plugin demands defensive null-handling wherever the plugin reference is resolved; (4) the removed view namespace breaks any local view publishing or override; (5) the narrow platform window forces us onto Laravel 12+/PHP 8.3+, which may cascade into other dependency upgrades. Offsetting these risks is strong evidence of quality: strict types, PHPDoc via Larastan 3 at max level on source and tests, architecture tests, and fixes rolled up from 4.1.0.
Key questions.
headers.id), or direct references to the removed facade / FilamentPanAnalyticsWidget class in our codebase?authorize closure, and is it evaluated per request or per render? Does it interact correctly with multi-panel scoping?current() reliably null (not stale) across panels without the plugin?4.x branch, so we know how long we can defer the Filament upgrade?Stack fit. This package will only run on Filament 4 or 5, Laravel 12 or 13, and PHP 8.3–8.5. That is an intentionally narrow, latest-version-only support matrix. Confirm our platform versions before scheduling work; if we are below that line, the package upgrade is entangled with a framework upgrade.
Migration path. Two distinct paths:
4.x branch. Do not upgrade the package independently of a Filament upgrade.getSearchable() calls, remove reliance on the "all" page size, drop references to the removed facade/class/testing mixin/stubs/install command, replace headers.id translation usage, and re-verify any view overrides (now impossible — refactor to configuration instead). Add ->authorize() if the widget should be role-gated in multi-tenant or multi-role panels.Compatibility. Not compatible with Filament 3, Laravel <12, PHP <8.3, or any code expecting the removed view namespace or asset pipeline. Verify Pan Analytics version compatibility separately. Keep the 4.x branch installed in any environment we cannot yet move.
Sequencing.
authorize policy where appropriate.current() behavior, and authorization for each relevant role/panel.Maintenance. Net positive. Strict types, PHPStan/Larastan max, architecture tests, and strict release hygiene lower ongoing defect risk and make future upgrades easier. The trade-off is a forced pace: the package tracks the latest Filament/Laravel, so staying current means our platform stays current too. The removed surface area is less code for us to maintain, but also less we can customize.
Support. Fewer moving parts to troubleshoot, and the new empty state ("where this data comes from") is a self-service win for end users. However, removal of view overrides and the install command will generate "how do I customize / how do I install" questions for which the package now has fewer answers. The authorize hook provides a clean governance story for access control requests.
Scaling. Shipping no assets removes a build step and client-side payload, simplifying deployment and improving page load. Right-aligned numeric columns improve scannability. The capped page sizes (5/10/25/50) are fine for small-to-mid datasets but will push high-volume analytics users toward server-side pagination or export workflows — worth planning for if any reporting flow depended on "all".
Failure modes. Hard failure if deployed against Filament 3 or PHP <8.3 (unsupported matrix). Null reference errors where current() is assumed non-null. User-facing regressions from the missing "all" page size and from broken custom views (now removed). Boot/render errors if an authorize closure throws or is misconfigured. Missing/stale translations if any local override still references headers.id.
Ramp-up. Low for a team already on Filament 4/5: plugin registration plus an authorize policy is roughly an hour of work, plus testing. Medium for teams on Filament 3: the package work is a few hours, but the enabling Filament 3→4 migration is days-to-weeks and should be planned as the real effort. Budget separately for the inventory audit and for user comms around the "all" page size removal.
How can I help you explore Laravel packages today?