the-tinderbox/clickhouse-php-client
PHP 7.1+ ClickHouse HTTP client built on Guzzle. Configure single servers or clusters, pick random or specific hosts, and run queries per-cluster. Supports async SELECT and INSERT from local files via a simple Client/ServerProvider API.
Pros:
Cons:
arrayJoin).queue system (e.g., dispatching async queries to a queue worker).DB facade can be extended to delegate to this client for ClickHouse queries.ccat be deployed (pre-built binary vs. custom compilation)?rowsBeforeLimitAtLeast) be logged/monitored in Laravel?.env or vault)?Http facade or Guzzle directly (if not using Laravel’s client).read()/write() methods).$this->app->singleton(ClickhouseClient::class, function ($app) {
$serverProvider = (new ServerProvider())
->addCluster(new Cluster('analytics', [...]));
return new Client($serverProvider);
});
DB facade to delegate ClickHouse queries:
DB::connection('clickhouse')->select('SELECT * FROM events');
clickhouse-driver).Connection class for Laravel’s DB facade.arrayJoin, groupBy optimizations).retry helper).format_* functions.guzzlehttp/guzzle:^7.0).config/clickhouse.php).readOne(), writeOne()) for simple use cases.ccat and MergedFiles for large datasets.rows, time) to Laravel’s monitoring tools (e.g., Sentry, Datadog).composer.json.clickhouse-driver or clickhouse-php if support is critical.How can I help you explore Laravel packages today?