NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #548 most downloaded on Packagist
Easily build Eloquent queries from API requests
Latest stable
7.3.8
Last release 14 days ago
06 Nov 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
141 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
fix simple paginator append not working
add support for custom includes
QueryBuilder (#621)prepend table name to WHERE clause for ambiguous partial filters
WHERE clause for ambiguous partial filters (#567)Your coding agent can read these notes before it upgrades. Set up the MCP server →
prepend table name to WHERE clause for ambiguous exact filters
WHERE clause for ambiguous exact filters (#467)fix config key to disable InvalidFilterQuery exception
InvalidFilterQuery exceptionmake nested scope compatible with older Laravel
add ability to filter by nested relationship scopes
InvalidFilterQuery exception (#525)update what defines an ignored filter value
add LengthAwarePaginator to QueryBuilder
Revert changes from v3.2.1 to AllowedFilter::filter()
AllowedFilter::filter()Fix filtering associative arrays
Illuminate\Database\Eloquent\Builder instead of a QueryBuilder instance- add support for Laravel 8
New major version. Please read the UPGRADING guide _before_ upgrading.
New major version. Please read the UPGRADING guide before upgrading.
Spatie\QueryBuilder\QueryBuilder class no longer extends Laravel's Illuminate\Database\Eloquent\BuilderNothing published for this version
Nothing published for this version
fix scope filters that are added via macros (e.g. onlyTrashed)
onlyTrashed) (#469)- add support for Laravel 7
- small fix for lumen
small fix for lumen in service provider
add support for model binding in scope filter parameters
fix alias for multiple allowed includes
add FiltersTrashed for filtering soft-deleted models
FiltersTrashed for filtering soft-deleted modelsFiltersCallback for filtering using a callbackfix dealing with empty or null includes
null includes (#395)- add defaultDirection
defaultDirectionadd support for a custom filter delimiter
resolve QueryBuilderRequest from service container
QueryBuilderRequest from service containerfix issue when passing camel-cased includes
add option to disable parsing relationship constraints when filtering related model properties in the exact and partial filters
- add support for Laravel 6
update doc block for QueryBuilder::for()
QueryBuilder::for()SortsFieldsorts and field selects are not allowed by default and need to be explicitly allowed
Count will add the related models' count using $query->withCount()Spatie\QueryBuilder\Sort to Spatie\QueryBuilder\AllowedSortSpatie\QueryBuilder\Included to Spatie\QueryBuilder\AllowedIncludeSpatie\QueryBuilder\Filter to Spatie\QueryBuilder\AllowedFilterFilter, Include and Sort interfaces no longer need to return the Builder instanceallowedFields should be called before allowedIncludes- add support for Laravel 6 - add support for PHP 8
bugfix: correctly parse sorts in chunked query
chunked query (#299)bugfix: orderByRaw is no longer being rejected as a sorting option
orderByRaw is no longer being rejected as a sorting option (#258)addSelect is no longer being replaced by the ?fields parameter (#260)allowedIncludes no longer adds duplicate includes for nested includes (#251)bugfix: remove duplicate parsing of (default) sort clauses
bugfix: replace missing sort() method on QueryBuilderRequest
sort() method on QueryBuilderRequestsort() method on QueryBuilderRequestallowedSorts and their aliasesallowedFields- security fixes
deprecated request macros (Request::filters(), Request::includes(), etc...)
QueryBuilderRequest to read data from the current requestRequest::filters(), Request::includes(), etc...)DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
QueryBuilderRequest to read data from the current requestRequest::filters(), Request::includes(), etc...)- security fixes
add support for multiple default sorts
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
add support for Laravel 5.5 and up (again)
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
fix default sort not parsing correctly
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
drop support for Laravel 5.7 and lower
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
use Str:: and Arr:: instead of helper methods
Str:: and Arr:: instead of helper methodsDO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
fix detection of false-positives for ignored values
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
$filter->ignore()allowedFilters('related-model.name')allow differently named columns
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
fix exception when using filters with nested arrays
allowedIncludes with many-to-many relationships (#118)DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
allowedIncludes with many-to-many relationships (#118)fix exception when using allowedFields() but selecting none
allowedFields() but selecting noneDO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
allowedFields() but selecting nonefix & cleanup Request::fields() macro
allowedFields methodRequest::fields() macroSELECT * FROM table instead of SELECT table.* FROM table)DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
allowedFields methodRequest::fields() macroSELECT * FROM table instead of SELECT table.* FROM table)fix parsing empty filters from url
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
improve compatibility with Lumen
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
improve compatibility with Lumen by only publishing the config file in console mode
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
add support for instantiated custom filter classes
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
fix for using reserved SQL words as attributes in Postgres
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
make sure filtering on string with special characters just works
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
fix for using reserved SQL words as attributes
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
prevent double sorting statments
DO NOT USE: THIS VERSION ALLOWS SQL INJECTION ATTACKS
One column per quarter.