therockersenior/l5-repository
A Laravel repository pattern package that adds Criteria, Presenters, Fractal transformers, and caching to keep your controllers slim and your data layer reusable and testable across projects.
Architecture fit
BaseRepository CRUD, composable Criteria (query filters), Presenters (Fractal-style output shaping), a CacheRepository decorator, and artisan generators for scaffolding. That is a coherent, opinionated slice of a layered/DDD-lite architecture, not a general-purpose ORM extension.extends BaseRepository) means business code sits on top of a third-party base class. That is convenient at adoption time and expensive at exit time.Integration feasibility
vendor:publish for config, then extend and bind interfaces in a service provider. Integration cost for a greenfield module is measured in days, not weeks.make:repository, make:criteria, make:presenter) are the real productivity lever and should be treated as the primary deliverable — templated, version-controlled scaffolding that enforces team convention.Technical risk
therockersenior/l5-repository but the repository URL points at andersao/l5-repository, and the andersao lineage was effectively superseded by the prettus/l5-repository fork several years ago. A package name, repo owner, and maintainer that do not align is a supply-chain question that must be resolved before any code is written — confirm which fork is actually being installed and who can publish releases to it.Dependents: 0 is implausible for a package of this vintage and is almost certainly a registry snapshot artifact. The reported last release of 2026-05-27 should likewise be verified against Packagist rather than trusted. Treat the metadata as unvalidated.RequestCriteria is an attack surface. Mapping arbitrary query parameters to search/filter/order fields without an explicit whitelist risks column enumeration, unindexed scans, and expensive sorts. This must be a hard team rule, not a code-review nicety.CacheRepository invalidation is not automatic. Cache keys derive from method arguments and criteria; writes through other paths (direct Eloquent, other services, queue workers) silently produce stale reads. The package provides the decorator, not the invalidation strategy.Key questions
RequestCriteria, and which fields are permitted to be searchable and sortable per endpoint?Stack fit
Migration path
Compatibility
Sequencing
RequestCriteria whitelists.Maintenance
Support
Scaling
CacheRepository is the read-scaling lever and also the correctness hazard; RequestCriteria can generate unindexed scans and expensive sorts from user-supplied parameters. Load-test the search and filter endpoints specifically.Failure modes
RequestCriteria permitting search or sort on non-whitelisted columns.Ramp-up
How can I help you explore Laravel packages today?