PHPackages                             tyasa81/dbrepositories - 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. tyasa81/dbrepositories

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

tyasa81/dbrepositories
======================

This is my package dbrepositories

v1.3.0(1y ago)0126[4 PRs](https://github.com/tyasa81/DbRepositories/pulls)MITPHPPHP ^8.2CI passing

Since Oct 3Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/tyasa81/DbRepositories)[ Packagist](https://packagist.org/packages/tyasa81/dbrepositories)[ Docs](https://github.com/tyasa81/dbrepositories)[ GitHub Sponsors]()[ RSS](/packages/tyasa81-dbrepositories/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (11)Versions (12)Used By (0)

This is my package dbrepositories
=================================

[](#this-is-my-package-dbrepositories)

[![Latest Version on Packagist](https://camo.githubusercontent.com/eebe880d4e38e63307f57f31a07bffb1e2ba7bcff301895b56ec0d093faab25a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f747961736138312f64627265706f7369746f726965732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tyasa81/dbrepositories)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3c1e6c748a6e6e6e72556bf83656954cec4be81e1750c98bd5c2cf9cb15c3cd0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f747961736138312f64627265706f7369746f726965732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/tyasa81/dbrepositories/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f0b3a0a4b252f4a9892262a255f8f20e276bb7bca263b8429135425faa477119/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f747961736138312f64627265706f7369746f726965732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/tyasa81/dbrepositories/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/7c2d44487d45c32765a97a5f716dc3f217cfa4d3e4cf153da57b3022188330e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f747961736138312f64627265706f7369746f726965732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tyasa81/dbrepositories)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

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

[](#installation)

You can install the package via composer:

```
composer require tyasa81/dbrepositories
```

Usage
-----

[](#usage)

create your repository file, then implement RepositoryInterface and use EloquentTrait as below. Or you can extend your own implementation

```
use tyasa81\DbRepositories\EloquentTrait;
use tyasa81\DbRepositories\RepositoryInterface;
use App\Models\User;

final class UserRepository implements RepositoryInterface
{
    use EloquentTrait;

    private $model;

    public function __construct(?string $connector = null)
    {
        $this->model = new User;
        if ($connector) {
            $this->model = $this->model->on($connector);
        }
    }
}
```

Testing
-------

[](#testing)

```
vendor/bin/testbench package:create-sqlite-db
vendor/bin/testbench migrate
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Tony Yasa](https://github.com/tyasa81)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance72

Regular maintenance activity

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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 ~5 days

Total

7

Last Release

549d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bf2677afb69b7f20b48a9a66bde2626a82c5536e6fc764884db5664979768fa?d=identicon)[tyasa81](/maintainers/tyasa81)

---

Top Contributors

[![tyasa81](https://avatars.githubusercontent.com/u/36804374?v=4)](https://github.com/tyasa81 "tyasa81 (45 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

laravelTony Yasadbrepositories

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/tyasa81-dbrepositories/health.svg)

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

###  Alternatives

[illuminate/database

The Illuminate Database package.

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

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[watson/validating

Eloquent model validating trait.

9723.3M46](/packages/watson-validating)[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.1M11](/packages/bavix-laravel-wallet)[spatie/laravel-model-flags

Add flags to Eloquent models

4301.1M1](/packages/spatie-laravel-model-flags)

PHPackages © 2026

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