PHPackages                             3neti/report-registry - 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. [Templating &amp; Views](/categories/templating)
4. /
5. 3neti/report-registry

ActiveLibrary[Templating &amp; Views](/categories/templating)

3neti/report-registry
=====================

Driver-based report registry with multi-format output and Handlebars templating

v1.1.1(2mo ago)023↓60%MITPHPPHP ^8.2

Since Mar 26Pushed 2mo agoCompare

[ Source](https://github.com/3neti/report-registry)[ Packagist](https://packagist.org/packages/3neti/report-registry)[ RSS](/packages/3neti-report-registry/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (3)Dependencies (14)Versions (4)Used By (0)

3neti/report-registry
=====================

[](#3netireport-registry)

Report Registry and Execution Engine for Laravel

---

Overview
--------

[](#overview)

`3neti/report-registry` is a Laravel package for defining, discovering, executing, and rendering reports using YAML-based drivers.

It provides:

- Driver-based report definitions (YAML)
- Resolver-driven data execution
- Pluggable output formatters (JSON, HTML, CSV, Text)
- Clean separation between data resolution and rendering

---

Key Concepts
------------

[](#key-concepts)

### Report Driver

[](#report-driver)

A YAML file that defines:

- metadata (id, title, description)
- columns
- filters
- resolver class
- optional templates

### Resolver

[](#resolver)

A class that implements:

```
ReportResolverInterface
```

Responsible for fetching and returning report data.

### Executor

[](#executor)

`ReportExecutor` orchestrates:

- loading the driver
- executing the resolver
- returning either raw data or formatted output

---

Output Modes
------------

[](#output-modes)

The executor supports two output categories:

### 1. Raw (machine-readable)

[](#1-raw-machine-readable)

Returns structured PHP array:

```
$result = $executor->execute('sales', format: 'raw');
```

Structure:

```
[
  'report' => [...],
  'data' => [...],
  'meta' => [...]
]
```

---

### 2. Rendered (string output)

[](#2-rendered-string-output)

Formats:

- `json`
- `html`
- `csv`
- `text`

```
$json = $executor->execute('sales', format: 'json');
$html = $executor->execute('sales', format: 'html');
```

All return **strings**.

---

Example Usage
-------------

[](#example-usage)

```
$executor = app(ReportExecutor::class);

// Raw payload
$data = $executor->execute('sales', format: 'raw');

// JSON output
$json = $executor->execute('sales', format: 'json');

// HTML output
$html = $executor->execute('sales', format: 'html');
```

---

Resolver Example
----------------

[](#resolver-example)

```
class SalesReportResolver implements ReportResolverInterface
{
    public function resolve(
        array $filters = [],
        ?string $sort = null,
        string $sortDirection = 'desc',
        int $perPage = 10,
        int $page = 1,
    ): array {
        return [
            'data' => [
                [
                    'reference' => 'INV-001',
                    'amount' => 1250.50,
                    'status' => 'approved',
                ]
            ],
            'meta' => [
                'total' => 1,
                'page' => 1,
                'per_page' => $perPage,
            ],
        ];
    }
}
```

---

CLI Usage
---------

[](#cli-usage)

```
php artisan report:run sales --format=json
php artisan report:run sales --format=html
php artisan report:run sales --format=raw
```

Options:

- `--filter=status:approved`
- `--sort=created_at`
- `--sort-dir=asc`
- `--per-page=50`
- `--page=1`
- `--output=report.json`

---

Formatter Contract
------------------

[](#formatter-contract)

All formatters implement:

```
ReportFormatterInterface
```

```
public function format(ReportDriverData $driver, array $data, array $meta): string;
```

Built-in formatters:

- JSON
- HTML
- CSV
- Text

---

Driver Structure (YAML)
-----------------------

[](#driver-structure-yaml)

```
driver:
  id: sales
  version: 1.1.0
  title: Sales Report

columns:
  - key: reference
    label: Reference
  - key: amount
    label: Amount

resolver: App\Reports\SalesReportResolver
```

---

Design Principles
-----------------

[](#design-principles)

- **Separation of concerns**
    - Resolver = data
    - Formatter = output
- **Driver-driven architecture**
- **Extensible format system**
- **API-first execution model**

---

Testing
-------

[](#testing)

Run tests:

```
composer test
```

Coverage includes:

- driver loading
- version resolution
- execution
- formatting
- output contracts

---

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance86

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Every ~11 days

Total

3

Last Release

69d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/586e1ed70140038e6348728222adbcf68bfc4455b1f94a4f8bcbe57917a63d57?d=identicon)[3neti](/maintainers/3neti)

---

Top Contributors

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

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/3neti-report-registry/health.svg)

```
[![Health](https://phpackages.com/badges/3neti-report-registry/health.svg)](https://phpackages.com/packages/3neti-report-registry)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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