Weave Code
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

Laravel Route Statistics Laravel Package

bilfeldt/laravel-route-statistics

Logs Laravel route usage statistics by recording and aggregating requests/responses per route, user, and timeframe (hour/day/month) to minimize database storage. Helps spot heavy users, high-traffic endpoints, and suspicious unauthenticated activity.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Development:

    • User Behavior Analytics: Track and analyze how users interact with specific routes (e.g., API endpoints, admin panels, or customer portals) to identify high-traffic or underutilized features. This enables data-driven decisions on feature prioritization, deprecation, or optimization.
    • Security & Anomaly Detection: Monitor unauthenticated traffic or suspicious patterns (e.g., brute-force attempts, bot activity) by analyzing route usage statistics for unusual spikes or repeated requests.
    • Performance Optimization: Identify bottlenecks by correlating route usage with response times or errors (integrate with Laravel’s built-in logging or third-party tools like Sentry).
    • A/B Testing & Feature Flags: Measure engagement for experimental features by comparing route usage between control and test groups.
  • Roadmap Alignment:

    • Observability Initiative: If your roadmap includes improving system observability, this package provides lightweight, low-overhead instrumentation for route-level metrics.
    • Multi-Tenant SaaS: For SaaS products, track route usage per team or tenant to allocate resources (e.g., rate-limiting, caching) or identify tenant-specific issues.
    • Compliance & Auditing: Log route access for regulatory requirements (e.g., GDPR, HIPAA) by storing user/team-associated route interactions with timestamps.
    • PHP 8.5 Migration: Supports teams upgrading to PHP 8.5, ensuring compatibility with the latest Laravel ecosystem and performance improvements.
  • Build vs. Buy:

    • Buy: Avoid reinventing the wheel for route-level analytics. This package is production-ready, MIT-licensed, and actively maintained (last release: v4.4.0, 2026).
    • Custom Build: Only consider building in-house if you need highly specialized aggregations (e.g., real-time dashboards with sub-second granularity) or deep integrations with proprietary monitoring tools.
  • Use Cases:

    • Internal Tools: Monitor admin dashboard or CLI route usage to detect inefficiencies in internal workflows.
    • Customer Support: Identify common user paths to improve onboarding or troubleshooting documentation.
    • Cost Optimization: Reduce cloud costs by identifying underused routes for auto-scaling adjustments.
    • PHP 8.5 Adoption: Enable seamless migration to PHP 8.5 for teams leveraging the latest language features (e.g., typed properties, enums) without breaking route analytics.

When to Consider This Package

  • Adopt This Package If:

    • You need lightweight route-level analytics without heavy instrumentation (e.g., no need for full request/response logging).
    • Your team uses Laravel 8+ and PHP 7.4+ to 8.5 (updated constraints in v4.4.0).
    • You want to minimize database bloat via configurable aggregation (e.g., hourly/daily/monthly) and optional route parameter logging.
    • You require user/team segmentation (e.g., SaaS, multi-tenant apps) or unauthenticated traffic monitoring.
    • You’re already using Laravel and want a zero-configuration solution for basic stats (global middleware) or granular control (per-route middleware or request macros).
    • You are migrating to PHP 8.5 and need to ensure compatibility with your analytics tools.
  • Look Elsewhere If:

    • You need real-time analytics or sub-second granularity (consider Prometheus + Grafana or specialized APM tools like Datadog).
    • Your app requires deep request/response payload logging (use bilfeldt/laravel-request-logger or custom solutions).
    • You’re on Laravel <8.0 or PHP <7.4 (package supports newer versions only).
    • You need advanced visualizations (e.g., heatmaps, session replays) — pair this with tools like Mixpanel or Amplitude.
    • Your compliance requirements mandate immutable logs (this package is optimized for analytics, not forensic auditing).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us track how users interact with our application at the route level—without adding significant overhead. With the latest update (v4.4.0), it now supports PHP 8.5, ensuring compatibility with our future-proof infrastructure. Key benefits include:

  • Identify which features are most/least used to prioritize development or sunsetting.
  • Detect unusual traffic patterns (e.g., bots, brute-force attacks) to improve security.
  • Optimize costs by scaling down underused routes or APIs.
  • Seamlessly upgrade to PHP 8.5 without disrupting analytics. It’s a low-lift, high-value addition that integrates effortlessly with Laravel, with minimal impact on performance. We can start with basic analytics and expand later if needed."*

For Engineering:

*"This is a lightweight, battle-tested solution for route-level statistics in Laravel, now fully compatible with PHP 8.5. Key benefits:

  • Flexible logging: Choose between global middleware, per-route middleware, or ad-hoc logging in controllers.
  • Database-efficient: Aggregates logs by time (hour/day/month) to keep storage costs low.
  • Extensible: Supports custom user/team models and route parameters out of the box.
  • Zero dependencies: Built on top of bilfeldt/laravel-request-logger, which is MIT-licensed and actively maintained. Implementation: Just add the middleware to bootstrap/app.php or target specific routes. Two Artisan commands (route:stats, route:unused) provide immediate value. No schema changes if you skip migrations (but recommended for analytics). Bonus: The update to PHP 8.5 ensures we can leverage modern language features while maintaining analytics integrity."*

For Data/Analytics Teams:

*"This gives us granular route-level data to answer questions like:

  • Which API endpoints are most/least popular?
  • How do authenticated vs. unauthenticated users interact with the system?
  • Are there usage spikes that correlate with feature releases or outages? The package automates data collection while keeping storage efficient. With PHP 8.5 support, we can also future-proof our infrastructure. We can later export raw logs to our BI tools (e.g., BigQuery, Snowflake) for deeper analysis."*
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.
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony
spatie/flare-daemon-runtime