aviator/eloquent-search-map
Eloquent Search Map is a Laravel package that maps search requests onto Eloquent query scopes, letting you turn URL filters into clean, reusable queries. Describe searchable fields once and keep controllers slim.
?status=active&created_after=...) where a consistent, declarative map from query string to query constraints reduces per-endpoint boilerplate.when($request->has(...)) chains; a shared mapping layer is a small but real velocity and consistency win.Consider it only as a design reference or short-lived spike:
Look elsewhere — which is the default recommendation — when any of the following hold:
Recommended alternatives to evaluate in its place: Spatie Laravel Query Builder (declarative filter/sort/include mapping, actively maintained), Eloquent Filter (filter classes per model), or a ~50-line internal trait if requirements are simple.
For executives (one paragraph): We evaluated aviator/eloquent-search-map, a small MIT-licensed Laravel package that turns search parameters into database query filters. It solves a real, recurring problem — consistent filtering across admin panels and APIs — but the package is archived, last released in 2017, has one star and zero dependent projects, and receives no maintenance or security updates. Adopting it would create dependency risk for negligible savings. Recommendation: do not adopt as a dependency; treat it as a reference pattern and either build a small internal equivalent (roughly one to two engineer-days) or adopt an actively maintained alternative. This keeps our filtering roadmap moving without adding unmaintained code to our stack.
For engineering: The concept is sound and small — a declarative map from request parameters to Eloquent constraints, eliminating repetitive when($request->has(...)) chains. But the 2017 code predates current Laravel conventions, will need patching for supported PHP/Laravel versions, and carries no upstream fixes. Proposal: build an internal trait covering our actual filter needs (typical scope: typed constraints, allow-listed parameters, relationship filters), or adopt Spatie Query Builder for broader features. Either path gives us the same ergonomics with tests, ownership, and upgrade support. Keep this repo bookmarked as a design reference only.
How can I help you explore Laravel packages today?