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

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

guardianslabs/repository
========================

Simple implementation of Active Repository

0.2.1(8y ago)326MITPHPPHP ~7.0|~7.1

Since Apr 28Pushed 8y ago2 watchersCompare

[ Source](https://github.com/GuardiansLabs/Repository)[ Packagist](https://packagist.org/packages/guardianslabs/repository)[ Docs](https://github.com/GuardiansLabs/Repository)[ RSS](/packages/guardianslabs-repository/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (6)Used By (0)

Repository
==========

[](#repository)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d64ce91224c4fcfb60b7c23d909e90d32fcd4f11c80857bd9392955015b3d176/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f477561726469616e734c6162732f5265706f7369746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/GuardiansLabs/Repository)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Quality Score](https://camo.githubusercontent.com/95b09978c594ae7613ac6fe4ce98db65386ebbf30c9a1a3f454f1ef16b20243d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f477561726469616e734c6162732f5265706f7369746f72792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/GuardiansLabs/Repository)[![Total Downloads](https://camo.githubusercontent.com/72b27341160c2dda5d15b790e6fed6977da16685e5595c1bcbf884d6e18c17aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f477561726469616e734c6162732f5265706f7369746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/GuardiansLabs/Repository)

Repository Is A very simple implementation for Active Repository

Install
-------

[](#install)

Via Composer

```
$ composer require guardiansLabs/repository
```

Usage
-----

[](#usage)

create your own repository that extend the our ActiveRepository and inject your model

```
use App\User;
use GuardiansLabs\Repository\Repositories\ActiveRepository;

class UserRepository extends ActiveRepository
{
    public function __construct()
    {
        $this->model =  new User();
    }
}
```

Avilavle methods
----------------

[](#avilavle-methods)

```

    public function setModel(Model $model);

    public function getModel();

    /**
     * @return Collection
     */
    public function findAll();

    /**
     * @param $itemId
     * @return Collection
     */
    public function findItemById($itemId);

    /**
     * @param array $data
     * @return Collection
     */
    public function createNew(array $data);

    /**
     * @param $itemId
     * @param array $data
     * @return mixed
     */
    public function update($itemId, array $data);

    /**
     * @param $itemId
     * @return mixed
     */
    public function delete($itemId);

    /**
     * @param array $where
     * @param array $columns
     * @internal param array $attributes
     * @return Collection
     */
    public function findWhere(array $where, $columns = ['*']);

    /**
     * @param $column
     * @param $values
     * @throws RepositoryException
     * @return Collection
     */
    public function findWhereIn($column, $values);
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Any Pull Requests are Welcome

Credits
-------

[](#credits)

- [mustafah15](https://github.com/mustafah15)
- contributors

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% 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 ~44 days

Total

4

Last Release

3216d ago

PHP version history (2 changes)0.0.0PHP ~5.6|~7.1

0.1PHP ~7.0|~7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6823250?v=4)[Mustafa Hussain](/maintainers/mustafah15)[@mustafah15](https://github.com/mustafah15)

---

Top Contributors

[![mustafah15](https://avatars.githubusercontent.com/u/6823250?v=4)](https://github.com/mustafah15 "mustafah15 (21 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

activelaravel-5-packagerepositoryrepositoryGuardiansLabs

### Embed Badge

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

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

###  Alternatives

[prettus/l5-repository

Laravel 8|9|10|11|12|13 - Repositories to the database layer

4.2k11.2M155](/packages/prettus-l5-repository)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.1M23](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

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

2051.4M2](/packages/glushkovds-phpclickhouse-laravel)[laravel-liberu/laravel-gedcom

A package that converts gedcom files to Eloquent models

782.5k1](/packages/laravel-liberu-laravel-gedcom)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

442.1k](/packages/itpathsolutions-dbstan)

PHPackages © 2026

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