inspiren-sem-tool/app/Services/ClickHouseService.php
brian-inspiren 221d3f8173
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
feat: sem codebase
2026-05-21 11:28:03 +08:00

28 lines
570 B
PHP

<?php
namespace App\Services;
use ClickHouseDB\Client;
class ClickHouseService
{
protected $client;
public function __construct()
{
$this->client = new Client([
'host' => env('CLICKHOUSE_HOST'),
'port' => env('CLICKHOUSE_PORT', 8123),
'username' => env('CLICKHOUSE_USER', 'default'),
'password' => env('CLICKHOUSE_PASSWORD', ''),
]);
$this->client->database(env('CLICKHOUSE_DATABASE', 'default'));
}
public function getClient()
{
return $this->client;
}
}