PHPackages                             actengage/metrics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. actengage/metrics

ActiveLibrary

actengage/metrics
=================

A abstraction for generating metrics in Laravel.

v2.0.1(1y ago)02.1kMITPHPPHP ^8.1

Since Jul 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ActiveEngagement/metrics)[ Packagist](https://packagist.org/packages/actengage/metrics)[ RSS](/packages/actengage-metrics/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (9)Used By (0)

Metrics
=======

[](#metrics)

This package provides a standalone metrics API similar to Laravel Nova.

Requirements
------------

[](#requirements)

- Laravel 9.x+
- PHP 8.1+

Getting Started
---------------

[](#getting-started)

*Install via Composer*

```
composer require actengage/metrics

```

Value Metric
------------

[](#value-metric)

```
use Actengage\Metrics\Contracts\Result;
use Actengage\Metrics\Value;
use App\Models\User;
use Illuminate\Http\Request;

$metric = new class extends Value {
    public function ranges(): array {
        return [
            '5' => '5 Days',
            '10' => '10 Days',
            '15' => '15 Days',
            'P21D' => '21 Days',
            'today' => 'Today',
            'yesterday' => 'Yesterday',
            'MTD' => 'Month To Date',
            'QTD' => 'Quarter To Date',
            'YTD' => 'Year To Date',
            'ALL' => 'All Time'
        ];
    }
    public function calculate(Request $request): Result {
        return $this
            ->title('Total Users')
            ->description('The total number of users.')
            ->timezone('EST')
            ->range('P21D')
            ->count(User::class)
            ->prefix('#')
            ->suffix('users');
    }
};

$result = $metric->resolve(request()->merge([
    'range' => 'MTD'
]));
```

Trend Metric
------------

[](#trend-metric)

```
use Actengage\Metrics\Contracts\Result;
use Actengage\Metrics\Trend;
use App\Models\User;
use Illuminate\Http\Request;

$metric = new class extends Trend {
    public function calculate(Request $request): Result {
        return $this
            ->title('User Registrations')
            ->description('User registrations trending by day.')
            ->twelveHourTime()
            ->range($request->range)
            ->count(User::class, Trend::BY_DAYS)
            ->prefix('#')
            ->suffix('users');
    }
};

$result = $metric->resolve(request()->merge([
    'range' => 30
]));
```

###  Health Score

34

—

LowBetter than 79% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 55.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~103 days

Recently: every ~113 days

Total

8

Last Release

618d ago

Major Versions

v0.9.2 → v1.0.02023-04-14

v1.0.2 → v2.0.02024-07-11

PHP version history (2 changes)v0.9.0PHP ^8.0

v1.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3751e573441701b44fab996c721a3249349c97f023d99986c2f6d646947727e5?d=identicon)[actengage](/maintainers/actengage)

---

Top Contributors

[![actengage](https://avatars.githubusercontent.com/u/33735047?v=4)](https://github.com/actengage "actengage (5 commits)")[![mitchellsolomon](https://avatars.githubusercontent.com/u/39250034?v=4)](https://github.com/mitchellsolomon "mitchellsolomon (4 commits)")

---

Tags

laravelMetricsstatistics

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/actengage-metrics/health.svg)

```
[![Health](https://phpackages.com/badges/actengage-metrics/health.svg)](https://phpackages.com/packages/actengage-metrics)
```

###  Alternatives

[leventcz/laravel-top

Real-time monitoring straight from the command line for Laravel applications.

577101.8k1](/packages/leventcz-laravel-top)[renoki-co/octane-exporter

Export Laravel Octane metrics using this Prometheus exporter.

30128.9k](/packages/renoki-co-octane-exporter)[cornford/googlitics

An easy way to integrate Google Analytics with Laravel.

3210.2k](/packages/cornford-googlitics)[amendozaaguiar/filament-route-statistics

Filament route statictics viewer

3224.7k1](/packages/amendozaaguiar-filament-route-statistics)[triadev/laravel-prometheus-exporter

A laravel and lumen service provider to export metrics for prometheus.

2628.1k1](/packages/triadev-laravel-prometheus-exporter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
