lorisleiva/laravel-search-string
Laravel Search String parses simple, human-friendly search queries like "status:active sort:-created_at name:John" into Eloquent database queries, with support for exact matches, negation, relationships, sorting, and fully customizable syntax.
?search= string into a validated, composable Eloquent query — a cheap way to ship a power-user search bar.SearchString facade exposes parsed terms, so a PM can scope phases — v1 ships field-scoped filtering and sorting, v2 adds relationship/whereHas searches, v3 considers full-text engines (Scout/Meilisearch/Algolia) if relevance ranking becomes a requirement.name:john, -status:archived, sort:-created_at), it doubles as a documented query contract for public or partner-facing endpoints, letting product define filters without bespoke query-param sprawl.Consider it when:
Look elsewhere when:
LIKE scans or unindexed whereHas clauses will not meet latency targets.For executives: This is a small, free, open-source library that lets us give users a powerful single-box search — the kind where you type status:active sort:-created_at and it just works — without buying or operating any new search infrastructure. It is the lowest-cost option for structured filtering in internal tools and admin surfaces, and it keeps our data in our own database. Latest release v1.3.0 adds Laravel 10 compatibility, which keeps us on a supported framework path and removes an adoption blocker for our upgrade roadmap. Risk is low: no vendor contract, no operational cost, no data leaving our systems; the trade-off is that it is not a relevance-ranked search engine, so customer-facing "search everything" features would still need a separate decision later.
For engineering: lorisleiva/laravel-search-string parses a search string into a declarative, testable query builder. v1.3.0 is a non-breaking minor release: it documents case-insensitive search behavior (clarifying existing semantics, not changing the API) and adds Laravel 10 support via a community contribution. No breaking changes, no deprecations, no migration work. Recommendation: safe to adopt for admin/back-office filtering now; evaluate against Scout + Meilisearch if relevance ranking or scale becomes a requirement. Pin the version, add a couple of integration tests around the searches we expose, and treat the search syntax as a documented contract so we can swap the implementation behind it if needed.
How can I help you explore Laravel packages today?