spatie/laravel-stats
Lightweight Laravel package to track stat changes in your app over time. Create a stats class, call increase/decrease on events (e.g., subscriptions), then query totals, increments, decrements, and differences grouped by day/week/month for any date range.
"This package lets us track critical business metrics—like subscriptions, churn, or user growth—with minimal engineering lift. Instead of spending months building custom analytics, we can deploy a lightweight, self-hosted solution in days. It gives us the data to measure success (e.g., ‘Are we hitting our MRR targets?’) and iterate faster. For example, we could track cancellations in real-time and identify trends before they become problems. It’s cost-effective, scalable, and keeps our data under our control—no vendor lock-in."
*"Spatie’s Laravel Stats is a battle-tested, MIT-licensed package that handles the boilerplate of incrementing/decrementing metrics and querying historical trends. It’s:
SubscriptionStats, ErrorRateStats) and granular time-based queries (daily/weekly/monthly).Use case: If we’re tracking SaaS metrics, we’d define SubscriptionStats::increase() in our checkout flow and SubscriptionStats::decrease() in cancellation logic. Queries like ->groupByWeek()->get() give us the trends we need for reports. It’s a no-brainer for MVP analytics or augmenting existing tools."*
How can I help you explore Laravel packages today?