myprogs/query-builderEloquent queries from filter, sort, include and fields request parameters, checked against an allow-list. Drop-in replacement for spatie/laravel-query-builder.
- PHP 8.3+
- Laravel 12–13
- MIT
The My Progs package catalog. Documentation in English and Russian, a separate version for every major release, sources and tests on GitHub.
GET /users?filter[name]=john&sort=-created_at&include=posts
QueryBuilder::for(User::class) ->allowedFilters('name') ->allowedSorts('created_at') ->allowedIncludes('posts') ->get();
Every package has its own page with a description and installation steps, and documentation split by version.
myprogs/query-builderEloquent queries from filter, sort, include and fields request parameters, checked against an allow-list. Drop-in replacement for spatie/laravel-query-builder.
An API request becomes an Eloquent query. Anything not explicitly allowed is rejected before it reaches the database.
GET /users?filter[name]=john&sort=-created_at&include=posts&fields[users]=id,nameuse MyProgs\QueryBuilder\QueryBuilder;
$users = QueryBuilder::for(User::class)
->allowedFilters('name')
->allowedSorts('created_at')
->allowedIncludes('posts')
->allowedFields('id', 'name', 'posts.title')
->get();Documentation in English and Russian with the same structure. A page without a translation is shown in English with a notice.
Each major version has its own documentation. Changes in minor releases are marked: “Since 1.2”.
Documentation lives in the package repository and changes with it. The “Edit” button on any page leads straight to GitHub.
Every package has its own test suite. Query Builder additionally runs the spatie test suite as its compatibility contract.