{"id":15041109,"url":"https://github.com/cybercog/laravel-clickhouse","last_synced_at":"2026-03-01T10:04:45.610Z","repository":{"id":49834780,"uuid":"470754925","full_name":"cybercog/laravel-clickhouse","owner":"cybercog","description":"Laravel ClickHouse adds CH client integration, generation \u0026 execution of ClickHouse database migrations to the Laravel application.","archived":false,"fork":false,"pushed_at":"2025-11-23T07:52:05.000Z","size":52,"stargazers_count":134,"open_issues_count":9,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-23T09:15:59.279Z","etag":null,"topics":["clickhouse","clickhouse-client","clickhouse-migration","cog","database","database-schema","db","db-schema","laravel","migration","php","schema"],"latest_commit_sha":null,"homepage":"https://komarev.com/sources/laravel-clickhouse","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cybercog.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-16T21:19:52.000Z","updated_at":"2025-11-23T07:52:08.000Z","dependencies_parsed_at":"2024-12-24T15:15:50.840Z","dependency_job_id":"5ad70a71-f872-49e4-81d8-faae98d5ce8a","html_url":"https://github.com/cybercog/laravel-clickhouse","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"0a022d794c1170cef19f0b9239c72bf74d95b0db"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cybercog/laravel-clickhouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybercog%2Flaravel-clickhouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybercog%2Flaravel-clickhouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybercog%2Flaravel-clickhouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybercog%2Flaravel-clickhouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cybercog","download_url":"https://codeload.github.com/cybercog/laravel-clickhouse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybercog%2Flaravel-clickhouse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29966684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T09:33:09.965Z","status":"ssl_error","status_checked_at":"2026-03-01T09:25:48.915Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clickhouse","clickhouse-client","clickhouse-migration","cog","database","database-schema","db","db-schema","laravel","migration","php","schema"],"created_at":"2024-09-24T20:45:33.801Z","updated_at":"2026-03-01T10:04:45.589Z","avatar_url":"https://github.com/cybercog.png","language":"PHP","funding_links":[],"categories":["Language bindings"],"sub_categories":["PHP"],"readme":"# Laravel ClickHouse\n\n![laravel-clickhouse](https://user-images.githubusercontent.com/1849174/158847081-af69213c-7f66-40e8-be0b-f127f128c653.png)\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://discord.gg/YcZDjNTzSa\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?logo=discord\u0026label=\u0026message=Discord\u0026color=36393f\u0026style=flat-square\" alt=\"Discord\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/cybercog/laravel-clickhouse/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/cybercog/laravel-clickhouse.svg?style=flat-square\" alt=\"Releases\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/cybercog/laravel-clickhouse/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/cybercog/laravel-clickhouse.svg?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Introduction\n\nLaravel ClickHouse database integration.\nThis package includes generation and execution of the ClickHouse database migrations in the Laravel application.\n\n## Features\n\n- [smi2/phpClickHouse] client integration\n- Migration creation\n- Migration execution\n\n## Installation\n\nPull in the package through [Composer](https://getcomposer.org/).\n\n```shell\ncomposer require cybercog/laravel-clickhouse\n```\n\n## Setup\n\nAdd environment variables in `.env` file.\n\n```dotenv\nCLICKHOUSE_HOST=localhost\nCLICKHOUSE_PORT=8123\nCLICKHOUSE_USER=default\nCLICKHOUSE_PASSWORD=\nCLICKHOUSE_DATABASE=default\n```\n\n### Configuration customization\n\nPublish ClickHouse configuration.\n\n```shell\nphp artisan vendor:publish --provider=\"Cog\\Laravel\\Clickhouse\\ClickhouseServiceProvider\" --tag=config\n```\n\nEdit `config/clickhouse.php` file.\n\n## Usage\n\n### ClickHouse client\n\nYou can use a singleton object [smi2/phpClickHouse] to query ClickHouse:\n\n```php\napp(\\ClickHouseDB\\Client::class)-\u003eselect(\n    /* Query */\n);\n\napp(\\ClickHouseDB\\Client::class)-\u003ewrite(\n    /* Query */\n);\n```\n\n### ClickHouse database migration\n\n#### Create migration\n\n```shell\nphp artisan make:clickhouse-migration create_example_table\n```\n\n\u003e New migration will be created in `database/clickhouse-migrations` directory.\n\n#### Run migrations\n\n```shell\nphp artisan clickhouse:migrate\n```\n\nTo remove the interactive question during production migrations, you can use `--force` option.\n\n```shell\nphp artisan clickhouse:migrate --force\n```\n\n##### Step\n\nYou can specify how many files need to be applied:\n\n```shell\nphp artisan clickhouse:migrate --step=1\n```\n\n\u003e Value `0` is default — all files\n\n#### Rollback migrations\n\n\u003e Rolling back migrations is intentionally unavailable. Migrations should go only forward.\n\n## Changelog\n\nDetailed changes for each release are documented in the [CHANGELOG.md](https://github.com/cybercog/laravel-clickhouse/blob/master/CHANGELOG.md).\n\n## License\n\n- `Laravel ClickHouse` package is open-sourced software licensed under the [MIT license](LICENSE) by [Anton Komarev].\n\n## 🌟 Stargazers over time\n\n[![Stargazers over time](https://chart.yhype.me/github/repository-star/v1/470754925.svg)](https://yhype.me?utm_source=github\u0026utm_medium=cybercog-laravel-clickhouse\u0026utm_content=chart-repository-star-cumulative)\n## About CyberCog\n\n[CyberCog] is a Social Unity of enthusiasts. Research the best solutions in product \u0026 software development is our passion.\n\n- [Follow us on Twitter]\n\n\u003ca href=\"https://cybercog.su\"\u003e\u003cimg src=\"https://cloud.githubusercontent.com/assets/1849174/18418932/e9edb390-7860-11e6-8a43-aa3fad524664.png\" alt=\"CyberCog\"\u003e\u003c/a\u003e\n\n[Anton Komarev]: https://komarev.com\n[CyberCog]: https://cybercog.su\n[Follow us on Twitter]: https://twitter.com/cybercog\n[smi2/phpClickHouse]: https://github.com/smi2/phpClickHouse#start\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybercog%2Flaravel-clickhouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcybercog%2Flaravel-clickhouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybercog%2Flaravel-clickhouse/lists"}