PHPackages                             filahq/statify - 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. [API Development](/categories/api)
4. /
5. filahq/statify

ActiveLibrary[API Development](/categories/api)

filahq/statify
==============

Export your Filament stat widgets as API.

v0.1.2(1mo ago)03MITPHPPHP ^8.2

Since Mar 18Pushed 1mo agoCompare

[ Source](https://github.com/filahq/filament-statify)[ Packagist](https://packagist.org/packages/filahq/statify)[ RSS](/packages/filahq-statify/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Statify
=======

[](#statify)

Export your Filament stat widgets as API.

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

[](#installation)

```
composer require filahq/statify
```

Statify's core package only requires Filament widgets.

If you also want the optional `StatifyPlugin` panel integration, install the full Filament package in your app:

```
composer require filament/filament
```

Publish the config:

```
php artisan vendor:publish --tag=statify-config
```

Configuration
-------------

[](#configuration)

```
// config/statify.php

return [
    'guard' => env('STATIFY_GUARD', 'token'), // "token" or "sanctum"
    'token' => env('STATIFY_TOKEN'),           // for "token" guard; null = open access
    'cache_ttl' => 60,                         // seconds
    'cache_prefix' => 'statify',
    'prefix' => 'api/statify',
];
```

Usage
-----

[](#usage)

### Register Widgets

[](#register-widgets)

Register your `StatsOverviewWidget` classes in a service provider:

```
use FilaHQ\Statify\Statify;

Statify::widgets([
    RevenueStatsWidget::class,
    UsersStatsWidget::class,
]);
```

Or, if your app has the full `filament/filament` package installed, use the optional Filament plugin in your panel provider:

```
use FilaHQ\Statify\StatifyPlugin;

$panel->plugin(
    StatifyPlugin::make()->widgets([
        RevenueStatsWidget::class,
        UsersStatsWidget::class,
    ])
);
```

### API Endpoints

[](#api-endpoints)

**Get all stats:**

```
GET /api/statify/stats

```

**Get stats from a specific widget:**

```
GET /api/statify/widgets/{widget-slug}

```

The widget slug is the kebab-case version of the class name (e.g., `RevenueStatsWidget` becomes `revenue-stats-widget`).

### Authentication

[](#authentication)

Statify supports two authentication modes, configured via `STATIFY_GUARD`:

#### Static Token (default)

[](#static-token-default)

Set `STATIFY_TOKEN` in your `.env` file:

```
STATIFY_TOKEN=your-secret-token
```

Authenticate via query parameter or header:

```
GET /api/statify/stats?token=your-secret-token

```

```
Authorization: Bearer your-secret-token

```

If no token is configured, the API is open (no auth required).

#### Laravel Sanctum

[](#laravel-sanctum)

Set the guard to Sanctum in your `.env`:

```
STATIFY_GUARD=sanctum
```

Install and configure Laravel Sanctum in your application before using this mode.

Generate a personal access token for your user:

```
$token = $user->createToken('statify')->plainTextToken;
```

Authenticate with the Sanctum token:

```
Authorization: Bearer {sanctum-token}

```

### Response Format

[](#response-format)

```
{
  "responded_at": "2026-03-13T12:00:00+00:00",
  "stats": [
    {
      "widget": "revenue-stats-widget",
      "id": "revenue-today",
      "label": "Revenue Today",
      "value": "$2,430",
      "raw_value": 2430,
      "description": "+12%",
      "icon": null,
      "color": "success",
      "chart": null
    }
  ]
}
```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance90

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Every ~1 days

Total

3

Last Release

51d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/06780dc3eb62d789cbde0e64cb900e4f2d010d99ec0d3ae35af9ae9b808d8041?d=identicon)[imknight](/maintainers/imknight)

---

Top Contributors

[![imknight](https://avatars.githubusercontent.com/u/77604?v=4)](https://github.com/imknight "imknight (16 commits)")

---

Tags

apilaravelwidgetstatsfilament

### Embed Badge

![Health badge](/badges/filahq-statify/health.svg)

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

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[specialtactics/l5-api

Dependencies for the Laravel API Boilerplate package

3672.8k2](/packages/specialtactics-l5-api)[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)
