PHPackages                             patinthehat/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. patinthehat/laravel-repositories

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

patinthehat/laravel-repositories
================================

Laravel 5 Repository classes

v1.0.1(9y ago)1121MITPHPPHP &gt;=5.6.4

Since Apr 1Pushed 9y ago2 watchersCompare

[ Source](https://github.com/patinthehat/laravel-repositories)[ Packagist](https://packagist.org/packages/patinthehat/laravel-repositories)[ RSS](/packages/patinthehat-laravel-repositories/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Laravel Repositories
--------------------

[](#laravel-repositories)

---

This package provides a basic Repository pattern implementation for use with Laravel 5+.

### Installation

[](#installation)

---

This package may be installed with composer:

`composer require patinthehat/laravel-repositories`

### Usage

[](#usage)

---

Extend the `Repository` class and define its `model` method to create a repository for that model:

```
use Permafrost\Repository;

class UserRepository extends Repository
{
    public static function model()
    {
        return 'App\\User';
    }
}
```

The repository can then be used:

```
  $user = UserRepository::findByFirstName('john');
```

### Dynamic Find Methods

[](#dynamic-find-methods)

---

The `Repository` class allows for dynamic `findByN/findAllByN` method calls, which will search the repository model's field N for its first argument. For example,

```
    UserRepository::findByFirstName('john')
```

results in a call to

```
    User::where('first_name', 'john')->first()
```

### License

[](#license)

---

This package is open source software, available under the MIT license. See [LICENSE](LICENSE) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

3329d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5508707?v=4)[Patrick Organ](/maintainers/patinthehat)[@patinthehat](https://github.com/patinthehat)

### Embed Badge

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

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

PHPackages © 2026

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