lucasbedout/detective
Detective is a Laravel package for inspecting and diagnosing application behavior, giving developers a clearer view of what happens under the hood so debugging and development investigations are faster and easier.
Feature scoping for search and filtering UX. Filtering is the invisible backbone of admin panels, internal dashboards, reporting screens, and list APIs. This package exists to answer one narrow question — "how do we turn a query string into safe, composable Eloquent constraints?" — which makes it useful as a reference design when scoping that feature, even if you never install it.
Build vs. buy vs. borrow. A 13-star package with a last release in October 2016 tells you the "buy" option is effectively off the table for anything long-lived. The productive decision it supports is borrow the pattern, build the implementation: a filter-to-query-scope contract is typically 1–3 days of work for a mid-level Laravel engineer, and owning it removes the dependency risk entirely.
Roadmap and dependency-risk calls. If this appears in a legacy codebase audit, it's a flag: an unmaintained, Laravel 5.x-era dependency that likely blocks PHP 8 / modern Laravel upgrades via Composer constraints. That's a concrete line item in a modernization plan, not a theoretical concern.
Use-case triage. Filtering requirements differ enormously by surface, and the package's scope only fits some of them:
| Surface | Fit |
|---|---|
| Internal admin tool, throwaway prototype, hackathon MVP | Plausible if already on Laravel 5.x |
| Public API with typed, documented filter contracts | Poor — needs validation, allow-listing, OpenAPI schema |
| Reporting/analytics with aggregates | Poor — different problem class |
| Multi-tenant data access | Poor — authorization must be enforced outside filter logic |
The key PM framing: filtering is a security-adjacent surface, not a convenience feature. Anything that lets a client influence a query needs an explicit allow-list of filterable fields and scopes. A small package can hide that risk; a deliberate internal contract surfaces it.
Consider it only when all of these hold:
Look elsewhere when any of these hold:
Practical next step: timebox a half-day spike. Attempt install on your actual Laravel/PHP version. If it fails — the likely outcome — the decision is made, and you reuse the package's parameter-to-scope idea in a first-party trait with validation and tests.
To executives (one paragraph): We evaluated a small open-source library for building search and filter screens. It solves a real, recurring need, but it was last released in 2016 and has almost no community behind it, so it carries maintenance and upgrade risk disproportionate to the ~2–3 days of engineering it would save. Recommendation: do not take it as a dependency. Instead, adopt its approach in a small in-house utility we control — same speed to market, no long-term liability, and it keeps our upgrade path to current Laravel and PHP clear.
To engineering (the substance):
How can I help you explore Laravel packages today?