Skip to content

laravel.pwLaravel packages with documentation that keeps up with the code

The My Progs package catalog. Documentation in English and Russian, a separate version for every major release, sources and tests on GitHub.

UserController.php
GET /users?filter[name]=john&sort=-created_at&include=posts
QueryBuilder::for(User::class)
    ->allowedFilters('name')
    ->allowedSorts('created_at')
    ->allowedIncludes('posts')
    ->get();

Packages ​

Every package has its own page with a description and installation steps, and documentation split by version.

Query Buildermyprogs/query-builder

Eloquent 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

What it looks like ​

An API request becomes an Eloquent query. Anything not explicitly allowed is rejected before it reaches the database.

  • Filters, sorts, includes and field sets are declared as allow-lists.
  • Included relations survive sparse fieldsets: the keys they need are added automatically.
  • The same API as spatie/laravel-query-builder: switching is a namespace change.
http
GET /users?filter[name]=john&sort=-created_at&include=posts&fields[users]=id,name
php
use MyProgs\QueryBuilder\QueryBuilder;

$users = QueryBuilder::for(User::class)
    ->allowedFilters('name')
    ->allowedSorts('created_at')
    ->allowedIncludes('posts')
    ->allowedFields('id', 'name', 'posts.title')
    ->get();

What every package comes with ​

🌐

Two languages ​

Documentation in English and Russian with the same structure. A page without a translation is shown in English with a notice.

🔀

A version for every major ​

Each major version has its own documentation. Changes in minor releases are marked: “Since 1.2”.

📝

Docs next to the code ​

Documentation lives in the package repository and changes with it. The “Edit” button on any page leads straight to GitHub.

✅

Covered by tests ​

Every package has its own test suite. Query Builder additionally runs the spatie test suite as its compatibility contract.

Author ​

ME

The packages and this site are made by Mikhail Esipenko, a senior full-stack web developer with more than 20 years of experience.

Package sources are on GitHub. Questions and suggestions go to the issues of the package in question.