PHPackages                             goldlapel/goldlapel - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. goldlapel/goldlapel

ActiveLibrary[HTTP &amp; Networking](/categories/http)

goldlapel/goldlapel
===================

Self-optimizing Postgres proxy — automatic materialized views and indexes

0.1.0-rc25(2mo ago)019↓87.5%1MITPHPPHP &gt;=8.1CI passing

Since Mar 15Pushed 1mo agoCompare

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

READMEChangelogDependencies (3)Versions (25)Used By (1)

goldlapel/goldlapel
===================

[](#goldlapelgoldlapel)

[![Tests](https://github.com/goldlapel/goldlapel-php/actions/workflows/test.yml/badge.svg)](https://github.com/goldlapel/goldlapel-php/actions/workflows/test.yml)

The PHP wrapper for [Gold Lapel](https://goldlapel.com) — a self-optimizing Postgres proxy that watches query patterns and creates materialized views + indexes automatically. Zero code changes beyond the connection string.

Install
-------

[](#install)

```
composer require goldlapel/goldlapel
```

Requires PHP 8.1+ and the `pdo_pgsql` extension.

Quickstart
----------

[](#quickstart)

```
use GoldLapel\GoldLapel;

// Spawn the proxy in front of your upstream DB
$gl = GoldLapel::start('postgresql://user:pass@localhost:5432/mydb');

// PDO can't take a postgresql:// URL directly — use the helpers
$pdo = new PDO($gl->pdoDsn(), ...$gl->pdoCredentials());
$rows = $pdo->query('SELECT * FROM users')->fetchAll(PDO::FETCH_ASSOC);

$gl->stop();  // (also cleaned up in __destruct)
```

Point PDO at `$gl->pdoDsn()` (with `$gl->pdoCredentials()`, since PDO doesn't accept `postgresql://` URLs directly). Gold Lapel sits between your app and your DB, watching query patterns and creating materialized views + indexes automatically. Zero code changes beyond the connection string.

Document store and streams live under nested namespaces:

```
$gl->documents->insert('orders', ['status' => 'pending']);
$pending = $gl->documents->find('orders', ['status' => 'pending']);
$gl->streams->add('clicks', ['url' => '/']);
```

Scoped transactional coordination via `$gl->using($pdo, $cb)`, Laravel auto-wiring, and native async via `GoldLapel\Amp\` are in the docs.

Dashboard
---------

[](#dashboard)

Gold Lapel exposes a live dashboard at `$gl->dashboardUrl()`:

```
echo $gl->dashboardUrl();
// -> http://127.0.0.1:7933
```

Documentation
-------------

[](#documentation)

Full API reference, configuration, Laravel integration, async (Amp), upgrading from v0.1, and production deployment:

Uninstalling
------------

[](#uninstalling)

Before removing the package, drop Gold Lapel's helper schema and cached matviews from your Postgres:

```
goldlapel clean
```

Then remove the package and any local state:

```
composer remove goldlapel/goldlapel
rm -rf ~/.goldlapel
rm -f goldlapel.toml     # only if you wrote one
```

Cancelling your subscription does not delete your data — only Gold Lapel's helper schema and cached matviews go away.

License
-------

[](#license)

MIT. See `LICENSE`.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

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

22

Last Release

68d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2dfc7790d8fbaad9cf21478b81841e0d1b278f3d5d65e3b3870409fadd4d726a?d=identicon)[stephengibson12](/maintainers/stephengibson12)

---

Top Contributors

[![stephengibson12](https://avatars.githubusercontent.com/u/47233?v=4)](https://github.com/stephengibson12 "stephengibson12 (143 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (22 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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