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.
v1.0.0-beta.1
2026-06-30 12:38 UTC
Requires
- php: ^8.1
- elasticsearch/elasticsearch: ^8.0
- illuminate/contracts: ^10.0|^11.0|^12.0
- illuminate/pagination: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
- ykan/elastickit: ^8.0.0
Requires (Dev)
- orchestra/testbench: ^8.0 || ^9.0 || ^10.0
- phpunit/phpunit: ^10.5 || ^11.0
This package is auto-updated.
Last update: 2026-07-10 17:17:18 UTC
README
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 nativeLengthAwarePaginator. - Artisan commands for index management (
index:create/delete/exists/mapping:put) and zero-downtimerebuild(withrollback/clean/unlock).
php artisan elastickit:rebuild posts
- Eloquent sync via the
EloquentSourcetrait — 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