ykan/elastickit-laravel

This package is abandoned and no longer maintained. No replacement package was suggested.

Laravel integration for ElasticKit: client bootstrapping and native pagination.

Maintainers

Package info

github.com/ykan821/ElasticKitLaravel

pkg:composer/ykan/elastickit-laravel

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.0-beta.1 2026-06-30 12:38 UTC

This package is auto-updated.

Last update: 2026-07-10 17:17:18 UTC


README

Latest Version License

Laravel integration for ElasticKit, the framework-agnostic Elasticsearch toolkit. It wires the Elasticsearch client from config, bridges ElasticKit's pagination to Laravel's paginator, exposes Artisan commands for index management and zero-downtime rebuilds, and syncs Eloquent models to Elasticsearch.

Requirements

PHP 8.1+, Laravel 10.x–12.x, Elasticsearch 8.x. ElasticKit is pulled in as a dependency.

Install

composer require ykan/elastickit-laravel
php artisan vendor:publish --tag=elastickit-config

Set cluster credentials in .env; the published config documents every option.

What it provides

  • ES clients built from config('elastickit.connections') — lazy, multi-cluster.
  • Pagination bridged to Laravel: paginate() reads the request and returns a native LengthAwarePaginator.
  • Artisan commands for index management (index:create / delete / exists / mapping:put) and zero-downtime rebuild (with rollback / clean / unlock).
php artisan elastickit:rebuild posts
  • Eloquent sync via the EloquentSource trait — attach it to an Index, declare a Model, and writes sync to Elasticsearch (queued, transaction-safe, source-driven).
use ElasticKit\Index\Index;
use ElasticKit\Laravel\EloquentSource;

class PostIndex extends Index
{
    use EloquentSource;

    protected string $name = 'posts';
    protected string $model = Post::class;
}

License

MIT