Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Laravel
  3. Laravel Search

Laravel Search

MITPHPv1.0.5

A Laravel package providing a unified API for full-text search across Elasticsearch, Algolia, and ZendSearch.

GitHubGitHub
351 stars55 forks0 contributors

What is Laravel Search?

Laravel Search is a PHP package for Laravel 5 that provides a unified API to interact with multiple full-text search services. It abstracts differences between Elasticsearch, Algolia, and ZendSearch, allowing developers to index, search, and filter data using a consistent, fluent syntax. This solves the problem of vendor lock-in and simplifies switching between search backends.

Target Audience

Laravel developers building applications that require full-text search capabilities, especially those who need flexibility to use different search engines (cloud-based like Algolia or self-hosted like Elasticsearch) without rewriting search logic.

Value Proposition

Developers choose Laravel Search because it offers a single, elegant API for multiple search drivers, reducing boilerplate code and making search implementations more maintainable. Its Laravel-native syntax and features like pagination, geo-search, and query callbacks integrate seamlessly into existing workflows.

Overview

A search package for Laravel 5.

Use Cases

Best For

  • Adding search functionality to Laravel applications without committing to a single search provider
  • Switching between Elasticsearch and Algolia in a Laravel project with minimal code changes
  • Implementing local search during development using ZendSearch
  • Building location-aware search features with geo-queries
  • Creating complex search interfaces with filters, pagination, and field selection
  • Abstracting search engine differences in multi-tenant or multi-service architectures

Not Ideal For

  • Projects solely using MySQL or PostgreSQL full-text search without needing external engines
  • Teams heavily reliant on one search engine's proprietary features (e.g., Algolia's InstantSearch UI)
  • Applications requiring real-time data sync or complex analytics best handled by native Elasticsearch APIs
  • Laravel 6+ projects seeking out-of-the-box compatibility, as support focuses on Laravel 5

Pros & Cons

Pros

Unified Search API

Offers a consistent, Laravel-style syntax for indexing, searching, and filtering across Elasticsearch, Algolia, and ZendSearch, as shown in the README with methods like Search::insert() and Search::search().

Fluent Query Builder

Enables chainable methods for building complex searches with filters, limits, and pagination, similar to Laravel's Eloquent, as demonstrated in examples like Search::search('content', 'fox')->where('status', 'published')->get().

Geo-Search Support

Provides location-aware searching via methods like whereLocation(), though limited to the Algolia driver, allowing geo-queries with latitude, longitude, and distance parameters.

Flexible Index Management

Supports multiple indices and automatic index creation, as shown in the 'Working With Multiple Indicies' section, where you can use Search::index('posts') to manage separate data types.

Cons

Driver-Specific Limitations

Key features like geo-search only work with Algolia, and advanced customization via callbacks requires handling native driver objects, reducing the abstraction's consistency and portability.

Dependency Complexity

Requires installing separate PHP packages for each driver (e.g., elasticsearch/elasticsearch for Elasticsearch), adding setup overhead and potential version conflicts, as noted in the 'Dependencies' section.

Outdated Laravel Support

Primarily targets Laravel 5, with Laravel 4 on a legacy branch, and lacks explicit support for newer Laravel versions, which could lead to compatibility issues in modern applications.

Frequently Asked Questions

Quick Stats

Stars351
Forks55
Contributors0
Open Issues20
Last commit9 years ago
CreatedSince 2014

Tags

#search#query-builder#laravel#geo-search#algolia#full-text-search#php#elasticsearch

Built With

P
PHP
L
Laravel

Included in

Laravel13.0k
Auto-fetched 17 hours ago

Related Projects

LiveWireLiveWire

A full-stack framework for Laravel that takes the pain out of building dynamic UIs.

Stars23,556
Forks1,742
Last commit2 days ago
Debug BarDebug Bar

Debugbar for Laravel (Integrates PHP Debug Bar)

Stars19,270
Forks1,617
Last commit14 days ago
IDE HelperIDE Helper

IDE Helper for Laravel

Stars14,953
Forks1,191
Last commit14 days ago
Intervention ImageIntervention Image

PHP Image Processing

Stars14,356
Forks1,495
Last commit5 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub