PHPackages                             dlx-llc/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. dlx-llc/laravel-repository

ActiveLibrary

dlx-llc/laravel-repository
==========================

Repository design pattern implementation for Laravel framework.

3.1.4(6mo ago)22.8k↓100%MITPHPPHP &gt;=8.2

Since Oct 11Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/dlx-llc/laravel-repository)[ Packagist](https://packagist.org/packages/dlx-llc/laravel-repository)[ RSS](/packages/dlx-llc-laravel-repository/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (17)Used By (0)

Laravel Repository
==================

[](#laravel-repository)

[![Laravel Version](https://camo.githubusercontent.com/34214f22dff868b7c33322f4213064fdddec0e1306bdf7d188712dd1a19d86a5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e7825324631322e782d626c7565)](https://laravel.com/)[![Latest Stable Version](https://camo.githubusercontent.com/73f9473a40a876f8cb692e1f0a561a39383bad696318b4ab388c617bd108db3f/68747470733a2f2f706f7365722e707567782e6f72672f646c782d6c6c632f6c61726176656c2d7265706f7369746f72792f76)](https://packagist.org/packages/dlx-llc/laravel-repository)[![Total Downloads](https://camo.githubusercontent.com/d4a2049560d024f0e0eae9b64d45978c5466767fca065a7d0469d5eb1ace6300/68747470733a2f2f706f7365722e707567782e6f72672f646c782d6c6c632f6c61726176656c2d7265706f7369746f72792f646f776e6c6f616473)](https://packagist.org/packages/dlx-llc/laravel-repository)[![Latest Unstable Version](https://camo.githubusercontent.com/5e46f43cc8b27f83fd6915989e0d49b68700174135581bc2ab121036e548a724/68747470733a2f2f706f7365722e707567782e6f72672f646c782d6c6c632f6c61726176656c2d7265706f7369746f72792f762f756e737461626c65)](https://packagist.org/packages/dlx-llc/laravel-repository)[![License](https://camo.githubusercontent.com/690e0296d726df789c77ff1188edb891968f894708bcff412f60ae4cb23c71e0/68747470733a2f2f706f7365722e707567782e6f72672f646c782d6c6c632f6c61726176656c2d7265706f7369746f72792f6c6963656e7365)](https://packagist.org/packages/dlx-llc/laravel-repository)[![PHP Version Require](https://camo.githubusercontent.com/aa558ae98d8804ed2099d507f0f87918b0789ea6205b92c2a851b0b3e6e767ee/68747470733a2f2f706f7365722e707567782e6f72672f646c782d6c6c632f6c61726176656c2d7265706f7369746f72792f726571756972652f706870)](https://packagist.org/packages/dlx-llc/laravel-repository)

What is repository?
-------------------

[](#what-is-repository)

Repository mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects. In this package you will find its implementation for the Laravel framework.

When to use it
--------------

[](#when-to-use-it)

In a large system with many domain object types and many possible queries, Repository reduces the amount of code needed to deal with all the querying that goes on. Repository promotes the Specification pattern (in the form of a criteria object), which encapsulates the query to be performed. Also, Repository can be really useful in situations with multiple data sources.

Installation
------------

[](#installation)

Install this package using Composer:

```
composer require dlx-llc/laravel-repository

```

This package uses auto-discovery for its service provider. However, if you have auto-discovery disabled for this package, you will need to manually register the service provider:

```
Deluxetech\LaRepo\LaRepoServiceProvider::class

```

This package has its own exception and validation error message translations. You can override them by following the steps described in the [Laravel documentation](https://laravel.com/docs/11.x/localization#overriding-package-language-files).

There are also configurations that you might need to replace with your own. In that case, you can publish configurations using the following command:

```
php artisan vendor:publish --tag=larepo-config

```

Versioning
----------

[](#versioning)

This package was built to use with the latest version of Laravel, but it should work fine with versions &gt;= 10.x.

Usage
-----

[](#usage)

You can use the generic EloquentRepository class by passing the Laravel model class name to its constructor. There's also a LaRepo facade which provide you with a group of methods that may save you time writing some repetitive code.

```
use Deluxetech\LaRepo\Facades\LaRepo;
use Deluxetech\LaRepo\Eloquent\GenericRepository;
use Deluxetech\LaRepo\Contracts\RepositoryContract;

class UserController
{
    protected RepositoryContract $repo;

    public function __construct()
    {
        $this->repo = new GenericRepository(User::class);
    }

    public function index()
    {
        return LaRepo::getManyWithRequest($this->repo);
    }
}
```

Running docker container
========================

[](#running-docker-container)

Build the image:

```
docker build -t dlx-llc-laravel-repository .

```

Use this command to (re)start the docker container:

```
docker rm -f dlx-llc-laravel-repository 2> /dev/null && \
docker run -itd \
    --name dlx-llc-laravel-repository \
    --mount type=bind,source="$(pwd)"/.,target=/home/larepo/app \
    --restart on-failure:5 \
    dlx-llc-laravel-repository

```

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance69

Regular maintenance activity

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 99.5% 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 ~51 days

Recently: every ~61 days

Total

16

Last Release

181d ago

Major Versions

1.1.4 → 2.0.02024-05-23

2.0.1 → 3.0.02024-08-01

3.0.1 → v4.x-dev2024-11-01

PHP version history (3 changes)1.0.0PHP 7.4 - 8

1.1.4PHP &gt;=8.1

2.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/c727378bb238351c17283183c7073539c36f50df1c9e48a03c7616b58ba0caf6?d=identicon)[deluxetech](/maintainers/deluxetech)

---

Top Contributors

[![koshetsyan](https://avatars.githubusercontent.com/u/37047539?v=4)](https://github.com/koshetsyan "koshetsyan (182 commits)")[![eduardtovmasyan](https://avatars.githubusercontent.com/u/64086954?v=4)](https://github.com/eduardtovmasyan "eduardtovmasyan (1 commits)")

---

Tags

laraveldatarepository

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)

PHPackages © 2026

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