Foxws
Laravel Scout · Query Builder · API Filters
Laravel Scout Builder

Build safe Laravel Scout search queries straight from API requests.

Latest release
1.0.1
Requires
PHP ^8.4
Laravel
12.x / 13.x
Licence
MIT
$ composer require foxws/laravel-scout-builder
Get started Source ↗

Introduction

Laravel Scout is Laravel's search package. This package adds a query builder on top of it, so you can turn HTTP request parameters into safe search queries.

It's modeled closely on spatie/laravel-query-builder and uses the same AllowedFilter / AllowedSort style. If you already know that package, this one will feel familiar — it's just built for Scout instead of Eloquent.

With it, API clients can filter, sort, include relationships, and paginate search results, all through query string parameters, without you writing that logic by hand for every endpoint.

Credits — This package is a close adaptation of spatie/laravel-query-builder. All credit for the original architecture, patterns, and API design belongs to Spatie. If this package is useful to you, please consider supporting Spatie.

Continue to Installation to get started.