Download the PHP package shouyongjiang/phpclickhouse-laravel without Composer
On this page you can find all versions of the php package shouyongjiang/phpclickhouse-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shouyongjiang/phpclickhouse-laravel
More information about shouyongjiang/phpclickhouse-laravel
Files in shouyongjiang/phpclickhouse-laravel
Package phpclickhouse-laravel
Short Description Adapter of the most popular library https://github.com/glushkovds/phpclickhouse-laravel to Fix
License MIT
Homepage https://github.com/shouyongjiang/phpclickhouse-laravel
Informations about the package phpclickhouse-laravel
phpClickHouse-laravel
Adapter to Laravel of the most popular libraries:
- https://github.com/smi2/phpClickHouse - for connections and perform queries
- https://github.com/the-tinderbox/ClickhouseBuilder - good query builder
Features
No dependency, only Curl (support php >=7.1 )
More:
Prerequisites
- php 7.1
- Laravel 7+
- clickhouse server
Installation
1. Install via composer
2. Add new connection into your config/database.php:
Then patch your .env:
3. Add service provider into your config/app.php file providers section:
Usage
You can use smi2/phpClickHouse functionality directly:
More about $db
see here: https://github.com/smi2/phpClickHouse/blob/master/README.md
Or use dawnings of Eloquent ORM (will be implemented completely)
1. Add model
2. Add migration
3. And then you can insert data
One row
Or bulk insert
4. Now check out the query builder
Advanced usage
Retries
You may enable ability to retry requests while received not 200 response, maybe due network connectivity problems.
Patch your .env:
retries is optional, default value is 0.
0 mean only one attempt.
1 mean one attempt + 1 retry while error (total 2 attempts).
All versions of phpclickhouse-laravel with dependencies
laravel/framework Version ^7.0|^8.0
smi2/phpclickhouse Version ^1.3
the-tinderbox/clickhouse-builder Version ^3.0|^4.0