PHPackages                             gkalmoukis/laravel-repositories - 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. gkalmoukis/laravel-repositories

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

gkalmoukis/laravel-repositories
===============================

v0.0.3.2(3y ago)1212[1 issues](https://github.com/gkalmoukis/laravel-repositories/issues)MITPHPPHP ^8.1

Since Feb 18Pushed 3y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Laravel Model Repository
========================

[](#laravel-model-repository)

A simple package to use **Repository Pattern** approach for Eloquent models.

Repository pattern
------------------

[](#repository-pattern)

Repositories are classes or components that encapsulate the logic required to access data sources. They centralize common data access functionality, providing better maintainability and decoupling the infrastructure or technology used to access databases from the domain model layer. [Microsoft](https://docs.microsoft.com/en-us/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-design)

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

[](#installation)

Require the package using composer:

```
composer require gkalmoukis/laravel-repositories
```

Command and Configuration
-------------------------

[](#command-and-configuration)

To use this package, you need to have repository class bound to laravel model class . This package includes a command that make it easy to to create repository classes from command line . to create a new repository class, run the following command

```
php artisan make:repository Repository --model=DummyModel
```

Usage
-----

[](#usage)

The best way to use the repository classes via **Dependency Injection** through the **controller** classes . for example :

```
namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Repositories\Repository;

class DummyController extends Controller {

	/**
     * create a new controller instance
     *
     * @param  \App\Repositories\Repository $repository
     * @return void
     */
    public function __construct(
        protected Repository $repository
    ) {}
}
```

And in that way one can already get a fully qualified repository class . Also to manually initiated :

```
$repository = new \App\Repositories\Repository(new DummyModel);
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.2% 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 ~22 days

Total

4

Last Release

1160d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39299141?v=4)[Giorgos Kalmoukis](/maintainers/gkalmoukis)[@gkalmoukis](https://github.com/gkalmoukis)

---

Top Contributors

[![gkalmoukis](https://avatars.githubusercontent.com/u/39299141?v=4)](https://github.com/gkalmoukis "gkalmoukis (15 commits)")[![jtritsetakis](https://avatars.githubusercontent.com/u/76480907?v=4)](https://github.com/jtritsetakis "jtritsetakis (2 commits)")

---

Tags

eloquentlaravelorm

### Embed Badge

![Health badge](/badges/gkalmoukis-laravel-repositories/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)

PHPackages © 2026

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