Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Search String Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Search UX feature decisions: Whether to build a human-friendly, URL-friendly search syntax (field-scoped terms, quoted phrases, negation, sorting, relation filters) rather than a form-based advanced search or a third-party search service. This package turns a plain ?search= string into a validated, composable Eloquent query — a cheap way to ship a power-user search bar.
  • Build vs. buy vs. adopt: For internal admin panels, dashboards, and back-office tooling, this is a "adopt" rather than "build" — it removes the bespoke tokenizer/parser work that otherwise gets reimplemented per project.
  • Roadmap scoping of search features: The 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.
  • API/filter contract design: Because the syntax is explicit (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.
  • Platform support decisions: v1.3.0 adds Laravel 10 support, unblocking adoption on projects mid-upgrade or planning to be on Laravel 10 — relevant to upgrade-timing and dependency-approval decisions.

When to Consider This Package

Consider it when:

  • Users need ad-hoc, multi-field filtering and sorting from a single text input (admin tables, log/record browsers, CRM-style lists).
  • You want zero-infrastructure search: it compiles to plain Eloquent SQL, so there is no new service to operate, no index to keep in sync, no additional vendor.
  • Your search requirements are deterministic and structured — exact/partial field matches, ranges, booleans, ordering — rather than relevance-ranked or fuzzy.
  • You need case-insensitive matching behavior; v1.3.0 explicitly documents how case sensitivity is handled, so the semantics are now spelled out rather than inferred.
  • The team values small, auditable surface area over a heavyweight search dependency.

Look elsewhere when:

  • You need relevance ranking, typo tolerance, faceting, or multilingual stemming — that is Scout plus a search engine (Meilisearch, Typesense, Algolia, Elasticsearch).
  • You need search across very large datasets where SQL LIKE scans or unindexed whereHas clauses will not meet latency targets.
  • You need user-saved searches, analytics on query terms, or synonym management — those require a dedicated layer.
  • Your app is on a Laravel version outside the package's supported matrix, or you cannot tolerate a community-maintained dependency whose release cadence is tied to Laravel version support.
  • You want a fully managed UI component; this is a parser/query-builder, not a front-end.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle