yajra/laravel-datatables-scout
Integrates Laravel Scout's full-text search with yajra/laravel-datatables, letting DataTables queries run through Scout engines like Algolia, Meilisearch, or the database driver. Adds a scout driver so searchable models stay filterable and sortable.
LIKE '%term%'. Framed as a product decision, it is the cheapest possible test of whether ranked, typo-tolerant, filterable search on internal tables (customers, orders, tickets, catalog) actually moves a support or ops metric — without commissioning a new search UI or redesigning admin screens.Consider adopting — spike first, then pin a version — when:
yajra/laravel-datatables (with at least one server-side table in production) and Laravel Scout with a configured, populated engine. All three prerequisites — DataTables, Scout, and a Searchable model whose Model::search('term') returns sensible results — must already work. If any is missing, this package cannot compensate and is the wrong place to start.LIKE on a table where the global search box is the primary way people find rows.LIKE '%term%' scans are visibly slow, and offloading the global search to an index measurably improves response time.src/, and budget roughly half a day to vendor/fork it if an upgrade blocks us.Look elsewhere — or hold off — when:
For executives — one paragraph: We can test whether better search on internal tools actually helps the business for the cost of a small integration, not a new product. This package connects search infrastructure we'd deploy anyway to the admin tables we already have, one screen at a time, with an easy rollback per screen. It does not lock us into a vendor: we can swap the underlying search engine without touching the UI. Risk is contained — it's a tiny MIT-licensed adapter we pin and, if necessary, own outright, applied to low-risk read-only tables first.
For engineering — the honest summary: A thin adapter that routes DataTables' global search term through Laravel Scout instead of SQL LIKE. Column filters, ordering, pagination, and Eloquent hydration stay exactly where they are. Adopt it per endpoint behind a single seam (one SearchStrategy choke point plus a feature flag), so the plain Eloquent path remains exercisable and the plugin can be dropped in an afternoon if it rots. Pin the version exactly; four independently-versioned moving parts (Laravel, DataTables, Scout, engine driver) and a single maintainer mean "vendor it" is a realistic plan, not a last resort.
For the team running it — the operational ask: Three things must be true before this earns its keep: the index is populated and current, recordsTotal/recordsFiltered counts are correct, and authorization scoping is applied before the plugin sees the query. Add a re-import runbook step, decide up front whether an engine outage falls back to Eloquent (usually yes for internal admin tables), and start in local dev on the database Scout driver so correctness is validated before we spend anything on relevance.
Framing to avoid: Don't sell this as "we're adopting a search platform." Sell it as "we're running a cheap, reversible experiment on one screen, and we own the off-ramp."
How can I help you explore Laravel packages today?