PHPackages                             cboxdk/laravel-billing-clickhouse - 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. [Payment Processing](/categories/payments)
4. /
5. cboxdk/laravel-billing-clickhouse

ActiveLibrary[Payment Processing](/categories/payments)

cboxdk/laravel-billing-clickhouse
=================================

Cbox Billing — ClickHouse event-log adapter: a columnar EventLog implementation for event-heavy metering, for cboxdk/laravel-billing.

v0.2.0(4w ago)03MITPHPPHP ^8.4CI passing

Since Jul 15Pushed 4w agoCompare

[ Source](https://github.com/cboxdk/laravel-billing-clickhouse)[ Packagist](https://packagist.org/packages/cboxdk/laravel-billing-clickhouse)[ RSS](/packages/cboxdk-laravel-billing-clickhouse/feed)WikiDiscussions main Synced 1w ago

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

Cbox Billing — ClickHouse event log
===================================

[](#cbox-billing--clickhouse-event-log)

**`cboxdk/laravel-billing-clickhouse`** — a ClickHouse-backed `EventLog` for [`cboxdk/laravel-billing`](https://github.com/cboxdk/laravel-billing), for event-heavy, high-cardinality metering where the relational event log would strain.

ClickHouse is **optional**: small/most deployments use the relational event log that ships with billing. Install this only when your usage volume calls for a columnar store — the `EventLog` contract is identical, so nothing calling it changes.

Install
-------

[](#install)

```
composer require cboxdk/laravel-billing-clickhouse
```

```
// .env
CLICKHOUSE_DSN=http://localhost:8123
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=
```

With a DSN set, billing's `Cbox\Billing\Metering\Contracts\EventLog` is bound to the ClickHouse adapter. Create the table once:

```
app(\Cbox\Billing\ClickHouse\ClickHouseEventLog::class)->migrate();
```

Design
------

[](#design)

- **HTTP interface, no heavy SDK.** Talks to ClickHouse over its HTTP endpoint via the Laravel HTTP client, so the append/sum logic is fully testable with `Http::fake`.
- **Idempotent by table engine.** A `ReplacingMergeTree` keyed on the event id collapses duplicates on merge; `sum` deduplicates by event id at query time, so it is correct even before a merge runs. Query parameters are bound, not interpolated.

> Verify against a live ClickHouse before relying on it in production.

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

[](#requirements)

PHP `^8.4`; Laravel `^12 || ^13`; `cboxdk/laravel-billing`.

License
-------

[](#license)

MIT.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance94

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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 ~9 days

Total

3

Last Release

28d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9761a79e61f2d5b9d650510dfb3555da18daf38f027aa84012c937e397e39a7?d=identicon)[cboxdk](/maintainers/cboxdk)

---

Top Contributors

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

---

Tags

billingcboxclickhouseevent-loglaravelmeteringlaravelbillingclickhousemeteringEvent Logcbox

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cboxdk-laravel-billing-clickhouse/health.svg)

```
[![Health](https://phpackages.com/badges/cboxdk-laravel-billing-clickhouse/health.svg)](https://phpackages.com/packages/cboxdk-laravel-billing-clickhouse)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M270](/packages/laravel-mcp)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k118.2M1.0k](/packages/laravel-socialite)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k59.5M714](/packages/laravel-scout)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k31.8M166](/packages/laravel-cashier)[illuminate/auth

The Illuminate Auth package.

10528.8M1.4k](/packages/illuminate-auth)

PHPackages © 2026

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