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

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

zhetenov/repository
===================

Easy way to create repository

112PHP

Since Jan 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/zhetenov/repository)[ Packagist](https://packagist.org/packages/zhetenov/repository)[ RSS](/packages/zhetenov-repository/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Repository Pattern
==========================

[](#laravel-repository-pattern)

[![Issues](https://camo.githubusercontent.com/17ff65d4716b498d79334cfa56bc7e4fa458300e9ba91cb91b16ad7342320947/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7a686574656e6f762f7265706f7369746f7279)](https://github.com/zhetenov/repository/issues)[![Forks](https://camo.githubusercontent.com/1168d3512823fe4fd4d1769b88136a839c1266b78b3fc070c6580c178600d344/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f7a686574656e6f762f7265706f7369746f7279)](https://github.com/zhetenov/repository/network/members)[![Stars](https://camo.githubusercontent.com/71256b873761f80a9ba480cb846c0760f2103c84f89b3d9d53ac81a046781c5d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f7a686574656e6f762f7265706f7369746f7279)](https://github.com/zhetenov/repository/stargazers)[![License](https://camo.githubusercontent.com/a6a7988033f7b3969d32bf37f8ea890b6322f0657dd97fd9eefd7f59ae578552/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7a686574656e6f762f7265706f7369746f7279)](https://github.com/zhetenov/repository/blob/master/LICENSE)

This package gives you an easy way to create repository in laravel by using command.

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

[](#installation)

In your terminal:

```
composer require zhetenov/repository
```

Using
-----

[](#using)

By using this command you can easily create repository:

```
php artisan make:repository User
```

You will see that there is a folder named Repositories and in this folder has User folder and it has 2 files UserRepository and User interface:

```
$ tree -a app
app
├── Console
├── Exceptions
├── Http
├── Providers
├── Repositories
│   └── User
│       ├── UserInterface.php
│       └── UserRepository.php
└── User.php
```

### Repository

[](#repository)

To begin, we need to return path of model in `getModelClass` method. And you can start working with repository pattern. For example to get all users we created method `getAll`. To start we called method startConditions which return copy of our User model(QueryBuilder). After that we can write own queryBuilder.

```
startConditions()
            ->all();
    }
}
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/27915539?v=4)[Zhetenov Ralan](/maintainers/zhetenov)[@zhetenov](https://github.com/zhetenov)

---

Top Contributors

[![zhetenov](https://avatars.githubusercontent.com/u/27915539?v=4)](https://github.com/zhetenov "zhetenov (1 commits)")

### Embed Badge

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

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

###  Alternatives

[dmind/cookieman

Provides a user consent popup. It asks for approval to include tracking objects (cookies, images or any HTML) and includes the objects when consented. It also removes cookies after the consent has been revoked.

39190.5k](/packages/dmind-cookieman)

PHPackages © 2026

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