PHPackages                             jooservices/laravel-repository - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. jooservices/laravel-repository

ActiveLibrary[Database &amp; ORM](/categories/database)

jooservices/laravel-repository
==============================

PHP 8.5+ Laravel repository package for trait-based CRUD, filtering, ordering, and request-driven query composition

v1.2.1(1mo ago)02581[6 PRs](https://github.com/jooservices/laravel-repository/pulls)3MITPHPPHP ^8.5CI passing

Since Mar 9Pushed 1mo agoCompare

[ Source](https://github.com/jooservices/laravel-repository)[ Packagist](https://packagist.org/packages/jooservices/laravel-repository)[ RSS](/packages/jooservices-laravel-repository/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (23)Versions (19)Used By (3)

JOOservices Laravel Repository
==============================

[](#jooservices-laravel-repository)

[![codecov](https://camo.githubusercontent.com/cd317c7f0b3da8c39c42cd908153d19415aaf81cfa15e8af05d990604396cc2f/68747470733a2f2f636f6465636f762e696f2f67682f6a6f6f73657276696365732f6c61726176656c2d7265706f7369746f72792f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/jooservices/laravel-repository)[![CI](https://github.com/jooservices/laravel-repository/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jooservices/laravel-repository/actions/workflows/ci.yml)[![OpenSSF Scorecard](https://camo.githubusercontent.com/931c88a52cea8d4fc32dae92f167d8843073aeccf7aa78f39aacbdaddc238dce/68747470733a2f2f6170692e736563757269747973636f726563617264732e6465762f70726f6a656374732f6769746875622e636f6d2f6a6f6f73657276696365732f6c61726176656c2d7265706f7369746f72792f6261646765)](https://securityscorecards.dev/viewer/?uri=github.com/jooservices/laravel-repository)[![PHP Version](https://camo.githubusercontent.com/2788132aa1e54031a6c94edcbf8688566d3e18cb5492cd1766836f74a24b27b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352532422d626c75652e737667)](https://www.php.net/)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/6794bcb125f2b6763199fb745c2ee7736aa308e8723ab61cef2a76893db9c119/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f6f73657276696365732f6c61726176656c2d7265706f7369746f7279)](https://packagist.org/packages/jooservices/laravel-repository)

The **JOOservices Laravel Repository** package is a PHP 8.5+ Laravel package for trait-based repository composition, CRUD, filtering, ordering, and request-driven query composition.

Package name: `jooservices/laravel-repository`

Install
-------

[](#install)

```
composer require jooservices/laravel-repository
```

Optionally publish the package config:

```
php artisan vendor:publish --tag=laravel-repository-config
```

Quick example
-------------

[](#quick-example)

```
use App\Models\User;
use Jooservices\LaravelRepository\Contracts\RepositoryInterface;
use Jooservices\LaravelRepository\Repositories\EloquentRepository;
use Jooservices\LaravelRepository\Traits\HasCrud;
use Jooservices\LaravelRepository\Traits\HasFilter;
use Jooservices\LaravelRepository\Traits\HasOrder;

final class UserRepository extends EloquentRepository implements RepositoryInterface
{
    use HasCrud;
    use HasFilter;
    use HasOrder;

    public function __construct(User $model)
    {
        parent::__construct($model);
    }
}

$repository = app(UserRepository::class);
$user = $repository->find($id);
$users = $repository->filter(['status' => 'active'])->orderBy(['created_at' => 'desc'])->paginate(15);
```

What is supported today
-----------------------

[](#what-is-supported-today)

- trait-based repository composition through segregated contracts and traits
- CRUD operations through `HasCrud`
- filter chains, collection retrieval, and pagination through `HasFilter`
- ordering through `HasOrder`
- request-driven query parsing through `HasRequestQuery`
- opt-in request-query allowlists and strict mode through `HasAllowedRequestQuery`
- request-driven field selection, named request filters, callback micro filters, request-query aliases, aggregate include helpers, and value-normalization rules
- first-class request operators such as `exact`, `partial`, `beginsWith`, and `endsWith`, plus safe aliases like `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, and `like`
- opt-in request scopes, scope definitions, relation count clauses, nested relation filters including `whereHas` and `whereDoesntHave` variants, derived count or exists includes, additional sum or avg or min or max aggregate includes, and cursor pagination
- reusable criteria stacks through `HasCriteria`
- read terminals such as `first`, `firstOrFail`, `exists`, and `count` through `HasRead`
- chunk, lazy, cursor, and `lazyById` iteration through `HasIteration`
- safe request pagination through `paginateFromRequest()`
- opt-in cache wrappers and cache-key helpers through `HasCache`
- reusable `Filter` and `Order` value objects

Important current boundaries
----------------------------

[](#important-current-boundaries)

- repositories opt into behavior through traits; no feature is globally implied
- query state is lazily created and reset after terminal filter operations
- `RequestQueryParser` supports only the implemented clause families

Documentation
-------------

[](#documentation)

Start with:

- [Documentation Hub](docs/README.md)
- [Installation](docs/01-getting-started/installation.md)
- [Quick Start](docs/01-getting-started/quick-start.md)
- [Trait-Based Composition](docs/02-user-guide/trait-based-composition.md)
- [Examples](docs/03-examples/README.md)
- [Competitive Comparison And Roadmap](docs/05-maintenance/competitive-comparison-and-roadmap.md)
- [Risks, Legacy, and Gaps](docs/05-maintenance/risks-legacy-and-gaps.md)

AI Support
----------

[](#ai-support)

This repository includes an AI skill pack for agents working in Cursor, Claude Code, VS Code, JetBrains, and Antigravity.

Start with:

- [AGENTS.md](AGENTS.md)
- [CLAUDE.md](CLAUDE.md)
- [AI Skills Map](ai/skills/README.md)
- [AI Skills Usage Guide](ai/skills/USAGE.md)

The canonical skill source lives in [`.github/skills/`](.github/skills/), with adapter layers for each supported AI environment.

Development
-----------

[](#development)

```
composer lint:all
composer test
```

Contributor workflow details live in:

- [Setup](docs/04-development/setup.md)
- [Coding Standards](docs/04-development/coding-standards.md)
- [Testing](docs/04-development/testing.md)
- [CI/CD](docs/04-development/ci-cd.md)
- [Release Process](docs/04-development/release-process.md)
- [AI Skills](docs/04-development/ai-skills.md)

GitHub Actions and Services
---------------------------

[](#github-actions-and-services)

The repository workflow set is designed to include CI, release, PR labeler, semantic PR title, scorecard, and secret-scanning workflows.

The CI baseline covers security checks, linting, tests with coverage artifacts, and optional dependency review. Release is tag-driven through `vX.Y.Z` tags.

Current external service integrations:

- `Codecov` for CI coverage uploads when `CODECOV_TOKEN` is configured
- `Packagist` for release-time package update notifications

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for version history.

License
-------

[](#license)

This project is licensed under the [MIT License](LICENSE).

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance91

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

4

Last Release

46d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/142772948?v=4)[JOOservices Ltd](/maintainers/jooservices)[@jooservices](https://github.com/jooservices)

---

Top Contributors

[![soulevilx](https://avatars.githubusercontent.com/u/2688707?v=4)](https://github.com/soulevilx "soulevilx (32 commits)")

---

Tags

composer-packagecrudeloquentjooserviceslaravelphpphp85repositoryrepository-patternrequest-querylaraveleloquentcrudrepositoryfilteringorderingrequest-query

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jooservices-laravel-repository/health.svg)

```
[![Health](https://phpackages.com/badges/jooservices-laravel-repository/health.svg)](https://phpackages.com/packages/jooservices-laravel-repository)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.6k](/packages/larastan-larastan)[prettus/l5-repository

Laravel 8|9|10|11|12|13 - Repositories to the database layer

4.2k11.2M153](/packages/prettus-l5-repository)[watson/validating

Eloquent model validating trait.

9733.4M53](/packages/watson-validating)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M16](/packages/reedware-laravel-relation-joins)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
