scout

Driver-based full-text search for Laravel Eloquent models with automatic index sync.

Library
Composer
vv11.5.0
1,676stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
86/100Excellent
Development Activity76
Maintenance80
Community88
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
85/100Excellent
Architecture86
Code Quality88
Innovation82
Learning Curve84

Laravel Scout is the official first-party package for adding full-text search to Eloquent models. It provides a simple, driver-based abstraction: once you mark a model as searchable, Scout automatically keeps your search indexes in sync with model changes using model observers and queued jobs.

Scout ships engines for Algolia, Meilisearch, Typesense, and a database/collection driver, so you can develop against one and switch providers without changing your query code. Searches use a fluent, Eloquent-like builder that returns hydrated models.

What You Get

  • A Searchable trait that makes any Eloquent model indexable
  • Automatic index synchronization via model observers and queued jobs
  • Pluggable engines for Algolia, Meilisearch, Typesense, and the database
  • A fluent search() builder returning hydrated Eloquent models
  • Artisan console commands for importing, flushing, and managing indexes

Common Use Cases

  • Adding fast full-text search to an existing Laravel application
  • Powering search-as-you-type over Eloquent-backed data
  • Switching between Algolia, Meilisearch, and Typesense without code changes
  • Keeping a hosted search index continuously in sync with the database

Under The Hood

Architecture - Scout attaches a Searchable trait (src/Searchable.php) that registers a ModelObserver to push model changes through an EngineManager to a driver-specific engine under src/Engines; queued Jobs (MakeSearchable, RemoveFromSearch) batch index updates, while the search Builder (src/Builder.php) constructs queries and maps engine results back to Eloquent models. Tech Stack - PHP package built on the Laravel framework (queues, collections, service provider), with official engine integrations for Algolia, Meilisearch, and Typesense and a database/collection fallback; tested with a PHPUnit and GitHub Actions CI suite. Code Quality - As a first-party Laravel package it is very actively maintained, follows Laravel’s conventions and contracts (src/Contracts), and carries an extensive test suite, reflected in its high repository-health score. API Design - The developer experience is deliberately minimal: add a trait, optionally define toSearchableArray(), and call Model::search(...), so search feels like a natural extension of Eloquent rather than a separate system.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search