PHPackages                             ariadata/laravel-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. [Database &amp; ORM](/categories/database)
4. /
5. ariadata/laravel-clickhouse

ActiveLibrary[Database &amp; ORM](/categories/database)

ariadata/laravel-clickhouse
===========================

ClickHouse database driver for Laravel — Eloquent, query builder, and schema support (Laravel 13+).

1.0.0(yesterday)04↑2900%MITPHPPHP ^8.3

Since Apr 4Pushed yesterdayCompare

[ Source](https://github.com/ariadata/laravel-clickhouse)[ Packagist](https://packagist.org/packages/ariadata/laravel-clickhouse)[ Docs](https://github.com/ariadata/laravel-clickhouse)[ RSS](/packages/ariadata-laravel-clickhouse/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (6)Versions (1)Used By (0)

Laravel ClickHouse
==================

[](#laravel-clickhouse)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5ce8a123ffe27e223d4e73c699fb39ccea3c9c55cafe7742979b55a7eee84890/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61726961646174612f6c61726176656c2d636c69636b686f7573652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ariadata/laravel-clickhouse)

**`ariadata/laravel-clickhouse`** — a Laravel database driver for [ClickHouse](https://clickhouse.com/) with Eloquent, the query builder, schema tooling, and ClickHouse-specific query helpers.

Forked and maintained from [`kundan-in/clickhouse-laravel`](https://github.com/kundan-in/clickhouse-laravel) with a new vendor namespace: **`Ariadata\LaravelClickHouse`**.

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

[](#requirements)

- PHP **8.3+**
- Laravel **13.x**
- ClickHouse server (HTTP interface, default port **8123**)

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

[](#installation)

```
composer require ariadata/laravel-clickhouse
```

Laravel will auto-discover `ClickHouseServiceProvider` and register the `ClickHouse` facade.

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

[](#configuration)

### 1. Publish config (optional)

[](#1-publish-config-optional)

```
php artisan vendor:publish --provider="Ariadata\LaravelClickHouse\ClickHouseServiceProvider" --tag="clickhouse-config"
```

### 2. Environment

[](#2-environment)

```
CLICKHOUSE_HOST=127.0.0.1
CLICKHOUSE_PORT=8123
CLICKHOUSE_USERNAME=default
CLICKHOUSE_PASSWORD=
CLICKHOUSE_DATABASE=default
```

### 3. `config/database.php`

[](#3-configdatabasephp)

```
'connections' => [
    // ...

    'clickhouse' => [
        'driver' => 'clickhouse',
        'host' => env('CLICKHOUSE_HOST', '127.0.0.1'),
        'port' => env('CLICKHOUSE_PORT', 8123),
        'username' => env('CLICKHOUSE_USERNAME', 'default'),
        'password' => env('CLICKHOUSE_PASSWORD', ''),
        'database' => env('CLICKHOUSE_DATABASE', 'default'),
        'settings' => [
            'readonly' => env('CLICKHOUSE_READONLY', 0),
            'max_execution_time' => env('CLICKHOUSE_MAX_EXECUTION_TIME', 60),
        ],
    ],
],
```

Usage
-----

[](#usage)

### Eloquent model

[](#eloquent-model)

```
