waad/truffle
Truffle is a Laravel package that adds simple, flexible search to your Eloquent models. Define searchable fields, build expressive queries, and filter results with a clean, chainable API—no external search engine or complex setup required.
app/Support or an internal package is a credible alternative to a Composer dependency. The decision to make explicitly is "do we accept an external dependency with a bus factor of one, or do we own ~300 lines?"make dev flow that boots a working app with zero database setup. If a sandbox or self-serve trial is on the roadmap, this is a cheap accelerant; if it isn't, this package has almost no product surface beyond CI.Adopt when:
JSONB operators, MySQL-specific functions, stored procedures, triggers, or full-text search. In-memory drivers will not faithfully reproduce these, and "tests pass, staging breaks" is the failure mode that kills this approach.RefreshDatabase migration overhead.Look elsewhere (or don't bother) when:
sqlite :memory: connection plus RefreshDatabase already covers your cases. The marginal value here is packaging convenience, not capability — verify you actually need the abstraction before adding a dependency.To executives: This is a developer-productivity lever, not a product feature. It has the potential to reduce CI infrastructure cost and shorten the PR feedback loop by removing database round-trips from the fast tier of testing. Frame success in one metric: median time-to-green on a PR. The investment is near-zero (an afternoon of integration), and the exit cost is near-zero because the abstraction is small enough to own in-house if the upstream project stalls. Approve as a scoped experiment with a two-sprint checkpoint, not as an architecture decision.
To engineering: A drop-in Eloquent connection driver for in-memory databases — useful for unit/integration tests, package test suites, and local bootstrapping without a DB service. Adopt behind a clear boundary: in-memory for the fast tier, real database for anything asserting dialect-specific behavior, and a documented list of what we deliberately don't test there. Because upstream is a solo-maintainer project with no dependents, plan to vendor or fork on day one rather than pinning a version and hoping — the cost of ownership is low now and will be much higher after six months of quiet reliance.
How can I help you explore Laravel packages today?