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

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

creode/laravel-repository
=========================

Exposes a base repository class that allows interactions with custom models.

1.1.0(2y ago)02.6k[1 issues](https://github.com/creode-modules/laravel-repository/issues)8MITPHP

Since Dec 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/creode-modules/laravel-repository)[ Packagist](https://packagist.org/packages/creode/laravel-repository)[ RSS](/packages/creode-laravel-repository/feed)WikiDiscussions 1.x Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (5)Used By (8)

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

[](#laravel-repository)

Exposes a base repository class that allows interactions with custom models.

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

[](#installation)

```
composer require creode/laravel-repository
```

Usage
-----

[](#usage)

To use this package, you must extend the base repository abstract class and override the getModel() method to return the model class you wish to use.

```
use Creode\LaravelRepository\BaseRepository;

class MyRepository extends BaseRepository
{
    /**
     * Returns the model class to use for this repository.
     *
     * @return string
     */
    protected function getModel()
    {
        return MyModel::class;
    }
}
```

This repository can then be called in any other class.

The benefit of utilising this class in your code means that you can rebind your model class using a namespace config string in your application. By swapping any hardcoded references to model classes directly with the repository, you can still call standard model functions on it but it allows dynamic binding at runtime.

For more details about the repository pattern see this article on the benefits of it:

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~62 days

Total

4

Last Release

741d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8133041?v=4)[Creode](/maintainers/creode)[@creode](https://github.com/creode)

---

Top Contributors

[![jaymeh](https://avatars.githubusercontent.com/u/18261676?v=4)](https://github.com/jaymeh "jaymeh (12 commits)")[![creode-dev](https://avatars.githubusercontent.com/u/19706903?v=4)](https://github.com/creode-dev "creode-dev (2 commits)")

### Embed Badge

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

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[awobaz/compoships

Laravel relationships with support for composite/multiple keys

1.2k11.7M47](/packages/awobaz-compoships)[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.3M19](/packages/bavix-laravel-wallet)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)

PHPackages © 2026

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