PHPackages                             toneflix-code/laravel-stats - 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. toneflix-code/laravel-stats

ActiveLibrary

toneflix-code/laravel-stats
===========================

A simple Laravel package to help you quickly get usage metrics and data from your app.

1.0.0(2y ago)03MITPHPPHP ^8.1|^8.2

Since Mar 19Pushed 2y agoCompare

[ Source](https://github.com/toneflix/laravel-stats)[ Packagist](https://packagist.org/packages/toneflix-code/laravel-stats)[ Docs](https://github.com/toneflix-code/laravel-stats)[ RSS](/packages/toneflix-code-laravel-stats/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

laravel-stats
=============

[](#laravel-stats)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3b6dc2b3eeeb0f6def70048ca34cf09a42d1efd6b4e87fccde9a6931e35ccf3a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f6e65666c69782d636f64652f6c61726176656c2d73746174732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/toneflix-code/laravel-stats)[![Total Downloads](https://camo.githubusercontent.com/a66685542af77f7b5df4d463b6cee5ddf64d19f1b197bf08642c3a38e8aacfb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f6e65666c69782d636f64652f6c61726176656c2d73746174732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/toneflix-code/laravel-stats)[![GitHub Actions](https://github.com/toneflix/laravel-stats/actions/workflows/main.yml/badge.svg)](https://github.com/toneflix/laravel-stats/actions/workflows/main.yml/badge.svg)

A simple Laravel package to help you quickly get usage metrics and data from your app.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require toneflix-code/laravel-stats
```

Usage
-----

[](#usage)

```
use ToneflixCode\Stats\Ranger;
use ToneflixCode\Stats\Stats;

$stats = (new Stats())
    ->registerMetric(
        modelClass: \App\Models\User::class,
        metric: Metric::COUNT,
        period: Ranger::years('created_at', 'M Y')->fromDate(now()->subYears(1))->toDate(now()->subYears(1)->addYear())->range('1 month'),
        aggregateField: 'id',
        label: 'old_users'
    )
    ->registerMetric(
        modelClass: \App\Models\User::class,
        period: ['from' => now()->subYears(1), 'to' => now()],
        metric: Metric::COUNT,
        aggregateField: 'id',
    )
    ->registerMetric(
        modelClass: new \App\Models\User(),
        period: ['from' => now()->subYears(1), 'to' => now()],
        metric: Metric::COUNT,
        callback: fn ($query) => $query->find(1)->posts(),
        aggregateField: 'id',
    )
    ->build()
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Legacy](https://github.com/3m1n3nc3)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

788d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4638f9de973d94753ebff641af3009e1049064f9a6bd76fe87e58d0d8ddd7ca7?d=identicon)[3m1n3nc3](/maintainers/3m1n3nc3)

---

Top Contributors

[![3m1n3nc3](https://avatars.githubusercontent.com/u/52163001?v=4)](https://github.com/3m1n3nc3 "3m1n3nc3 (17 commits)")

---

Tags

laravelMetricsstatslaravel-statslegacy

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/toneflix-code-laravel-stats/health.svg)

```
[![Health](https://phpackages.com/badges/toneflix-code-laravel-stats/health.svg)](https://phpackages.com/packages/toneflix-code-laravel-stats)
```

###  Alternatives

[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[rogervila/laravel-legacy-ui

Legacy UI with Auth scaffolding for Laravel 8.x &amp; 9.x

559.5k](/packages/rogervila-laravel-legacy-ui)[triadev/laravel-prometheus-exporter

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

2728.2k1](/packages/triadev-laravel-prometheus-exporter)[still-code/laravel-umami

Umami API wrapper for laravel

362.5k](/packages/still-code-laravel-umami)

PHPackages © 2026

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