vusys / laravel-quantum-slipstream-drive
A Laravel package.
Package info
github.com/Vusys/laravel-quantum-slipstream-drive
pkg:composer/vusys/laravel-quantum-slipstream-drive
Requires
- php: ^8.3
- illuminate/support: ^11.0|^12.0|^13.0
Requires (Dev)
- driftingly/rector-laravel: ^2.0
- infection/infection: ^0.29 || ^0.33 || ^0.34
- larastan/larastan: ^2.9|^3.0
- laravel/pint: ^1.0
- orchestra/testbench: ^9.0|^10.0|^11.0
- phpunit/phpunit: ^11.0|^12.0|^13.0
- rector/rector: ^2.0
- vusys/laravel-runabout: dev-master
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-12 15:23:54 UTC
README
Fold your Eloquent queries into a slipstream until the database wonders where everybody went.
A scoped Eloquent identity map, process-truth engine, and query-elision planner for Laravel. Add one trait and the same model loaded by a middleware, a controller, a policy, and a view composer is fetched once — every redundant SELECT for the life of the request or job is served from memory instead.
It goes beyond the classic single-key identity map: it rewrites key-set queries so only unknown IDs hit the database, evaluates WHERE predicates against cached attributes, serves where('email', …)->first() lookups from a unique-key index, and tracks whole query regions so a broad ->get() primes narrower follow-ups. Nothing is serialized or shared between processes; when the scope ends, the map is discarded.
📚 Full documentation: vusys.github.io/laravel-quantum-slipstream-drive
Requirements
- PHP 8.3+
- Laravel 11, 12, or 13
Installation
composer require vusys/laravel-quantum-slipstream-drive
Quick start
Add the HasIdentityMap trait to any Eloquent model — that is the entire setup:
use Vusys\QuantumSlipstreamDrive\HasIdentityMap; final class User extends Model { use HasIdentityMap; }
Now redundant reads within a request or job are elided automatically:
$a = User::find(1); $b = User::find(1); $a === $b; // true — the second call issues no SQL User::find([1, 2, 3, 4]); // Already in map: 1, 2. Confirmed absent: 3. // SQL: SELECT * FROM users WHERE id IN (4)
The Getting started guide covers opting out per query, manual flushing, and disabling for a scope.
Documentation
Full docs live at vusys.github.io/laravel-quantum-slipstream-drive. By topic:
| Topic | Page |
|---|---|
| The problem, what it is / is not, when it helps | Home |
| Installing and requirements | Installation |
| Opt-in trait, opt-out, flush, disable | Getting started |
Unique-key lookups, explain(), predicates, relations |
Usage |
| Every config key and env override | Configuration |
| How the engine works internally | Architecture & internals |
explain(), the QueryDecided event, the decision log |
Observability |
| The six test layers and the CI matrix | Testing |
Contributing
See CONTRIBUTING.md for the four quality gates and code conventions, and CHANGELOG.md for release history.
License
MIT. See LICENSE.