spatie

spatie/laravel-searchable

PHP MIT Web Dev

Pragmatically search through models and other sources

1.4k stars
111 forks
slow
GitHub +1 / week

1.4k

Stars

111

Forks

0

Open issues

26

Contributors

1.13.3 21 Feb 2026

AI Analysis

Laravel Searchable is a Laravel package that enables structured search across multiple data sources (models, APIs, files, arrays) with a unified interface. It's specifically designed for developers building Laravel applications who need pragmatic, case-insensitive search functionality without heavy database overhead. It is not a full-text search engine replacement like Elasticsearch, and is best suited for small-to-medium result sets.

Web Dev Library Discovery value: 5/10
Documentation 8/10
Activity 7/10
Community 8/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

laravel-package search-functionality php-library model-querying polymorphic-search
Actively maintained MIT licensed Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
1w ago

Spatie's pragmatic multi-source search for Laravel: narrow scope, steady maintenance, modest adoption

Laravel Searchable is a PHP package that provides a unified interface for searching across Eloquent models and custom data sources (APIs, files, arrays). Built by Spatie in 2018, it abstracts search logic into reusable 'aspects' so developers can combine searches from heterogeneous sources and present grouped results. Adoption appears concentrated within Laravel's ecosystem, primarily for simple full-text scenarios where developers prefer ORM-native search over specialized search engines.

Origin

Created by Spatie in December 2018, the package emerged as a lightweight alternative to full-text search engines for Laravel applications. It gained modest traction (~1,374 stars as of mid-2026) and remains active, though growth has plateaued relative to Spatie's flagship libraries like laravel-permission (12,920 stars) and laravel-medialibrary (6,142 stars).

Growth

Initial adoption was driven by Spatie's brand credibility and Laravel ecosystem positioning. The package appears to have reached a stable, small audience around 2019–2021 and shows little growth velocity since. Zero stars gained in the most recent week (as of analysis date) reflects market saturation for this specific niche rather than decline, suggesting a mature, feature-complete tool with limited expansion runway.

In production

Adoption not verified at scale. No production case studies, corporate endorsements, or deployment reports are evident in the README or repository metadata. Packagist download counts are not disclosed in the provided information. The similar repo 'protonemedia/laravel-cross-eloquent-search' (1,131 stars) suggests a competing approach exists, but head-to-head adoption data is unavailable.

Code analysis
Architecture

Based on README, the architecture centers on a `Search` class that registers multiple `SearchAspect` implementations, each encapsulating queries over a data source (models, APIs, etc.). Models must implement a `Searchable` interface returning a `SearchResult` object. Likely enables loose coupling between search sources via a fluent API. The design appears pragmatic and straightforward, avoiding complex query analysis or ranking logic.

Tests

README includes a CI badge referencing 'run-tests' workflow, suggesting automated testing infrastructure exists, but test coverage metrics are not documented in the README.

Maintenance

Last push was 2026-02-21 (approximately 4 months before analysis date). This is recent and indicates active maintenance. GitHub Actions workflow is referenced and presumably passing. No evidence of stalled issues or unmerged PRs in available metadata. Appears to be maintained at a low, steady frequency consistent with a stable, feature-complete library.

Honest verdict

ADOPT IF: you need lightweight, multi-source search (models + APIs + custom data) in a Laravel app without external dependencies, your result volumes are modest (~1000s of records), and you want an ORM-native, fluent API. AVOID IF: you require full-text ranking, typo tolerance, faceted search, or need to scale beyond database limits—use Scout or a dedicated search engine instead. MONITOR IF: you are evaluating it for a greenfield project—verify Packagist download trends and check whether the adjacent laravel-cross-eloquent-search or Scout might fit better after prototyping.

Independent dimensions

Mainstream potential

3/10

Technical importance

5/10

Adoption evidence

3/10

Risks
  • Limited to simple substring matching (case-insensitive) based on README; no full-text ranking, fuzzy matching, or relevance tuning documented
  • Performance characteristics for large datasets (100k+ records per model) not addressed in README; likely uses naive LIKE/OR queries, potentially slow on production scale
  • Adoption concentration in Spatie-aware Laravel community; limited evidence of usage in adjacent PHP frameworks or non-Laravel codebases
  • Maintenance depends on Spatie's priorities; seven years of slow growth (1,374 stars) suggests it may be deprioritized if Spatie focuses on higher-impact projects
  • Custom SearchAspect extensibility requires boilerplate implementation; ease of adoption for non-model sources (APIs, files) depends on developer comfort with interface contracts
Prediction

Likely to remain a stable, niche tool for simple in-app search in small-to-medium Laravel applications. Expansion into production search (ranking, analytics, personalization) is improbable given competition from Scout and specialized engines. May see minor growth if Laravel ecosystem emphasizes no-external-dependency architectures, but mainstream dominance is unlikely.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

PHP
100%

Information

Language
PHP
License
MIT
Last updated
5mo ago
Created
92mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Open issues

No open issues — clean slate.

Open pull requests

No open pull requests.

Similar repos

protonemedia

protonemedia/laravel-cross-eloquent-search

This Laravel package enables searching across multiple Eloquent models...

1.1k PHP Web Dev
laravel

laravel/scout

Laravel Scout is a driver-based full-text search abstraction layer for...

1.7k PHP Web Dev
spatie

spatie/laravel-sluggable

Laravel-sluggable is a Laravel package that automatically generates unique,...

1.6k PHP Web Dev
spatie

spatie/eloquent-sortable

A PHP trait that adds sortable behavior to Laravel Eloquent models,...

1.5k PHP Web Dev
spatie

spatie/laravel-tags

A Laravel package that adds tagging capabilities to Eloquent models with a...

1.7k PHP Web Dev
vs. alternatives
protonemedia/laravel-cross-eloquent-search

Similar star count (1,131 vs. 1,374), solves overlapping problem (cross-model search), but lacks custom SearchAspect abstraction; likely simpler but less extensible for non-model sources

Scout (Laravel official)

Official Laravel package for full-text search; integrates Algolia, Meilisearch, Typesense; targets production search scenarios at scale; broader adoption but higher operational overhead

Elasticsearch / Meilisearch (direct)

Specialized search engines; provide ranking, relevance tuning, filters; overkill for simple in-app search but superior for complex queries and large datasets

spatie/laravel-query-builder

Sibling Spatie package (4,456 stars); similar query-building abstraction; used alongside laravel-searchable in some applications for filtering post-search results