submtd/laravel-request-scope
Laravel Request Scope adds request-scoped service container bindings, so services are resolved once per request and reset automatically between requests. Useful for request-specific state, tenant context, and long-running workers such as Laravel Octane.
?sort=-created_at&filter[status]=active) is a product decision, not just a technical one: it becomes a public interface that clients, mobile apps, and integrations will depend on. This package is the vehicle for that decision.if ($request->has('status')) blocks in controllers. The real decision is whether to standardize on a declarative, whitelist-driven convention or keep hand-rolling per endpoint. This package represents the "standardize" option with a small, swappable dependency.Adopt when:
Look elsewhere when:
spatie/laravel-query-builder) exist specifically because these are common next asks.filter[...] semantics, migrating to a richer or differently-shaped DSL is a breaking change with a deprecation cycle — decide the long-term shape before you ship.Due-diligence checklist before adoption: last commit recency, test coverage, whether it supports your Laravel/PHP version matrix, whether sort/filter inputs are validated against a whitelist, and whether it plays nicely with pagination and query caching.
To executives: This is a small, low-cost standardization that lets us ship filterable and sortable data views — admin tools, reporting screens, customer list pages — faster and more consistently. The value is in velocity and uniformity, not novelty: it replaces repeated custom code with one reviewed convention. Because it's a thin layer over query-param parsing, the downside is bounded and reversing it later is a contained engineering task, not a re-architecture. The main caveat to flag is maturity: the package has essentially no community adoption, so I'd recommend a time-boxed spike and a code review before we standardize on it, and I'd avoid making it the foundation of a public API contract without that review.
To engineering: Adopt a declarative, whitelist-driven convention for sort/filter query parameters so we stop hand-rolling per-endpoint conditionals. Define allowed fields explicitly — this is the security boundary against ORDER BY injection — and keep the abstraction thin so it's replaceable if our needs grow toward relation includes, sparse fieldsets, or a proper query language. Read the source before merging; with no upstream community we are effectively the maintainers, so pin the version and add integration tests around the endpoints that depend on it. If we need more than filter-and-sort within the next two quarters, evaluate a more established alternative now rather than paying a migration later.
How can I help you explore Laravel packages today?