friendsofhyperf / elasticsearch
Elasticsearch client for hyperf
Fund package maintenance!
huangdijia
hdj.me/sponsors
Requires
- php: >=8.1
- elasticsearch/elasticsearch: ^8.0
- hyperf/config: ~3.1.0
- hyperf/context: ~3.1.0
- hyperf/guzzle: ~3.1.0
README
The Elasticsearch client for Hyperf.
Installation
composer require friendsofhyperf/elasticsearch
Usage
use FriendsOfHyperf\Elasticsearch\ClientBuilderFactory; class Foo { public function __construct(protected ClientBuilderFactory $clientBuilderFactory) { } public function handle() { $client = $clientBuilderFactory->create()->build(); // ... } }