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

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

knash94/repositories
====================

Laravel repositories with base repositories for eloquent with a cache decorator

v0.1.3(9y ago)036PHP

Since Jan 16Pushed 9y ago1 watchersCompare

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

READMEChangelog (3)DependenciesVersions (5)Used By (0)

knash94-repositories
====================

[](#knash94-repositories)

Repositories is a package for Laravel that makes it much easier to create repositories for Laravel, whether you want just a Eloquent repository or an eloquent repository with cache.

\##Installation Run the following command from your terminal

```
composer require knash94/repositories
```

Open app/config with your favorite text editor and add the following line under package service providers

```
Knash94\Repositories\RepositoryServiceProvider::class,
```

\##Usage To create a basic repository without cache

```
php artisan make:repository exampleRepository
```

or with cache

```
php artisan make:repository exampleRepository --with-cache
```

Afterwards, open the new generated file under app/repositories/exampleRepository.php and find

```
protected $model;
```

and replace it with your models class, for example

```
protected $model = User::class;
```

After that you're all ready to go!

\##Repository methods

```
public function all();

public function count();

public function countWhere($column, $value);

public function findById($id);

public function updateById($id, array $attributes);

public function create(array $attributes);

public function get();

public function groupBy($columns);

public function limit($limit);

public function orderBy($column, $direction = 'asc');

public function select($columns = ['*']);

public function where($column, $operator = null, $value = null, $boolean = 'and');

public function createMultiple(array $data);

public function with($relations);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Total

4

Last Release

3292d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a89bcb2111cc14dc4bf1baa938e0ec1ee50c164e2b4560f8356ef8f610d09fd?d=identicon)[knash94](/maintainers/knash94)

---

Top Contributors

[![knash94](https://avatars.githubusercontent.com/u/16624721?v=4)](https://github.com/knash94 "knash94 (15 commits)")

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M545](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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