PHPackages                             adiliogobira/elastic-client - 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. [Search &amp; Filtering](/categories/search)
4. /
5. adiliogobira/elastic-client

ActiveLibrary[Search &amp; Filtering](/categories/search)

adiliogobira/elastic-client
===========================

The official PHP Elasticsearch client integrated with Laravel

v1.1.0(5y ago)08MITPHPPHP ^7.2

Since May 1Pushed 5y agoCompare

[ Source](https://github.com/adiliogobira/elastic-client)[ Packagist](https://packagist.org/packages/adiliogobira/elastic-client)[ RSS](/packages/adiliogobira-elastic-client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (4)Used By (0)

Elastic Client
==============

[](#elastic-client)

[![Latest Stable Version](https://camo.githubusercontent.com/8bcfcc8d5f508337fca94effce15a1823f9d7e400efc27153305595427fef3e9/68747470733a2f2f706f7365722e707567782e6f72672f626162656e6b6f6976616e2f656c61737469632d636c69656e742f762f737461626c65)](https://packagist.org/packages/babenkoivan/elastic-client)[![Total Downloads](https://camo.githubusercontent.com/550f1f475ce44e8fad936a0f0a8fd47f79fdefe5b85c602bd18cbf396c6cf639/68747470733a2f2f706f7365722e707567782e6f72672f626162656e6b6f6976616e2f656c61737469632d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/babenkoivan/elastic-client)[![License](https://camo.githubusercontent.com/e4d33a47e6a18c6edd906be645110bf876199d14dba4912188b03b2a53b4544c/68747470733a2f2f706f7365722e707567782e6f72672f626162656e6b6f6976616e2f656c61737469632d636c69656e742f6c6963656e7365)](https://packagist.org/packages/babenkoivan/elastic-client)[![Build Status](https://camo.githubusercontent.com/c20328f4af14b30e883b501caefb57ed67ae6f84b28c2d6481abcf17bd9069c8/68747470733a2f2f7472617669732d63692e636f6d2f626162656e6b6f6976616e2f656c61737469632d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/babenkoivan/elastic-client)[![Donate PayPal](https://camo.githubusercontent.com/0b8a275d67dfb2aa74ac299fa07b7fce95217f6620448d88cf05ff9e3653e9bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d70617970616c2d626c7565)](https://paypal.me/babenkoi)[![Donate Amazon](https://camo.githubusercontent.com/d16fca9e126410f4f08f6e790ce431f6f3976a5c5d8ec0cd398ea7c217b5d511/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d616d617a6f6e2d626c61636b)](https://www.amazon.de/Amazon-de-e-Gift-Voucher-Various-Designs/dp/B07Q1JNC7R)

---

The official PHP Elasticsearch client integrated with Laravel.

Contents
--------

[](#contents)

- [Compatibility](#compatibility)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)

Compatibility
-------------

[](#compatibility)

The current version of Elastic Client has been tested with the following configuration:

- PHP 7.2-7.4
- Elasticsearch 7.x

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

[](#installation)

The library can be installed via Composer:

```
composer require babenkoivan/elastic-client
```

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

[](#configuration)

To change the client settings you need to publish the configuration file first:

```
php artisan vendor:publish --provider="ElasticClient\ServiceProvider"
```

You can use any settings supported by [\\Elasticsearch\\ClientBuilder::fromConfig](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/configuration.html#_building_the_client_from_a_configuration_hash)method in the `config/elastic.client.php` file as this factory is used under the hood:

```
return [
    'hosts' => [
        env('ELASTIC_HOST', 'localhost:9200'),
    ]
];
```

Usage
-----

[](#usage)

Type hint `\Elasticsearch\Client` or use `resolve` function to retrieve the client instance in your code:

```
namespace App\Console\Commands;

use Elasticsearch\Client;
use Illuminate\Console\Command;

class CreateIndex extends Command
{
    protected $signature = 'create:index {name}';

    protected $description = 'Creates an index';

    public function handle(Client $client)
    {
        $client->indices()->create([
            'index' => $this->argument('name')
        ]);
    }
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Total

3

Last Release

2133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fef2452bcfcbfe8d46fe2ab2b6afcbd593a8c2518f0c53e0c27c5a1375fee995?d=identicon)[adiliogobira](/maintainers/adiliogobira)

---

Top Contributors

[![babenkoivan](https://avatars.githubusercontent.com/u/25812954?v=4)](https://github.com/babenkoivan "babenkoivan (25 commits)")[![adiliogobira](https://avatars.githubusercontent.com/u/3763290?v=4)](https://github.com/adiliogobira "adiliogobira (1 commits)")

---

Tags

phpclientlaravelelasticsearchelastic

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/adiliogobira-elastic-client/health.svg)

```
[![Health](https://phpackages.com/badges/adiliogobira-elastic-client/health.svg)](https://phpackages.com/packages/adiliogobira-elastic-client)
```

###  Alternatives

[babenkoivan/elastic-client

The official PHP Elasticsearch client integrated with Laravel

544.0M6](/packages/babenkoivan-elastic-client)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[babenkoivan/elastic-scout-driver

Elasticsearch driver for Laravel Scout

2773.8M5](/packages/babenkoivan-elastic-scout-driver)[babenkoivan/elastic-scout-driver-plus

Extension for Elastic Scout Driver

2862.8M1](/packages/babenkoivan-elastic-scout-driver-plus)[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

397612.3k](/packages/jeroen-g-explorer)[babenkoivan/elastic-migrations

Elasticsearch migrations for Laravel

1962.5M6](/packages/babenkoivan-elastic-migrations)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
