Seamless Laravel Integration
An intuitive, Eloquent-like syntax for your search cluster. Index, search, and query without complex configuration.
for Laravel · Elasticsearch & OpenSearch
An eloquent way to search.
Fluent, Eloquent-style queries for Elasticsearch and OpenSearch. No hand-built JSON DSL.
$ composer require lacasera/elastic-bridgePHP 8.2+ · Laravel 10–12 · Elasticsearch 8.x / OpenSearch 2.x
A bridge is a model for your index. Define it, query it in a controller, fake it in a test.
<?php
namespace App\Bridges;
use Lacasera\ElasticBridge\ElasticBridge;
class HotelRoom extends ElasticBridge
{
protected $index = 'hotel-rooms';
}Bridges behave like the Eloquent models you already know.
An intuitive, Eloquent-like syntax for your search cluster. Index, search, and query without complex configuration.
Choose your backend with a single config value. One fluent API across both drivers, with basic-auth, API key, and AWS SigV4.
Multi-match queries, aggregations, filtering, geo queries, and full-text search — ranked hits, straight back.
Mock and assert your search queries without a live cluster. Fast suites, no containers required.
Length-aware and cursor pagination out of the box, mirroring Laravel's paginator APIs.
Shape documents on the way in and out with attribute casting, accessors, and mutators — just like Eloquent.
Jump straight to what you need.