plugins/laravel-expert/skills/laravel-scout/SKILL.md
Implement full-text search with Laravel Scout. Use when adding search to Eloquent models with Meilisearch, Algolia, or database driver.
npx skillsauth add fusengine/agents laravel-scoutInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
| Component | Purpose | |-----------|---------| | Searchable Trait | Makes Eloquent models searchable | | Search Drivers | Meilisearch, Algolia, database, collection | | Indexing | Automatic sync on model changes | | Search Builder | Fluent search API with filters |
Which driver?
├── Production (recommended) → Meilisearch (fast, self-hosted, free)
├── Managed service → Algolia (hosted, pay per search)
├── Small dataset → database (no extra infra)
└── Testing → collection (in-memory, no engine)
composer require laravel/scout
composer require meilisearch/meilisearch-php http-interop/http-factory-guzzle
SCOUT_DRIVER=meilisearch
MEILISEARCH_HOST=http://127.0.0.1:7700
MEILISEARCH_KEY=masterKey
$results = Article::search('laravel tutorial')->paginate(15);
toSearchableArray() to control indexed dataSCOUT_QUEUE=true for performancesearchable() for bulk import after setupScout::withoutSyncing()| Need | Reference | |------|-----------| | Searchable trait, indexing, conditions | searchable.md | | Driver setup, Meilisearch, Algolia | drivers.md |
SCOUT_QUEUE=true)toSearchableArray()Pour la recherche sémantique (embeddings) sur PostgreSQL, Laravel 13 expose Schema::ensureVectorExtensionExists() et whereVectorSimilarTo() via la skill dédiée [[laravel-vector-search]]. Scout reste pertinent pour le full-text (Meilisearch/Algolia) ; pour la similarité vectorielle, utiliser pgvector directement sans driver Scout.
// Hybride : Scout pour full-text, pgvector pour similarité
$keyword = Post::search($query)->get();
$semantic = Post::whereVectorSimilarTo('embedding', $embedding, limit: 10)->get();
development
Use when optimizing entity-based / semantic SEO 2026. Covers entity maps, Google Knowledge Graph resolution, salience scoring, passage-level ranking, about/sameAs/knowsAbout schema, Cloud Natural Language API validation.
development
Use when running SEO, GEO, schema, Core Web Vitals, sitemap, hreflang, E-E-A-T, AI Overviews, technical SEO, or structured data tasks. Covers full-site audits, single-page analysis, schema markup, content quality, AI search optimization, local SEO, sitemap/robots, internal linking, semantic clustering, and search experience.
development
Use when optimizing search experience (SXO). Covers intent matching, user personas, user stories, page-type analysis, dwell time, scroll depth, pogo-sticking prevention.
development
Use when optimizing local SEO. Covers Google Business Profile, NAP consistency, citations, reviews acquisition, Local Pack ranking, location pages, LocalBusiness schema.