PHPackages                             shekarsiri/baserepo - 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. shekarsiri/baserepo

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

shekarsiri/baserepo
===================

Base repositories

1.2(10y ago)0901MITPHPPHP &gt;=5.5.9

Since Jul 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/shekarsiri/baserepo)[ Packagist](https://packagist.org/packages/shekarsiri/baserepo)[ RSS](/packages/shekarsiri-baserepo/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (1)

Base Repository
===============

[](#base-repository)

Example
-------

[](#example)

### Repository

[](#repository)

```

use ShekarSiri\BaseRepo\Crudable;
use ShekarSiri\BaseRepo\Pagination;
use ShekarSiri\BaseRepo\Repo;

/**
 * Interface LocationRepository
 *
 */
interface LocationRepository extends Crudable, Repo, Pagination
{

}

```

### Implementation

[](#implementation)

```

use Location;
use ShekarSiri\BaseRepo\CrudableTrait;
use ShekarSiri\BaseRepo\PaginationTrait;
use ShekarSiri\BaseRepo\RepoTrait;

/**
 * Class LocationRepositoryEloquent
 *
 */
class LocationRepositoryEloquent implements LocationRepository
{
    use CrudableTrait, PaginationTrait, RepoTrait;

    private $queries = [
        'name' => 'LIKE'
    ];

    function __construct(Location $model)
    {
        $this->model = $model;
    }

}

```

```
use LocationRepository;
use Illuminate\Http\Request;

class LocationController extends Controller
{

    /**
     * @var LocationRepository
     */
    private $repo;

    function __construct(LocationRepository $repo)
    {
        $this->middleware('auth', ['except' => ['autoComplete']]);
        $this->repo = $repo;
    }

    public function index(Request $request)
    {
        $locations = $this->repo->pagination(10, [], $request->all());
        return response()->json($locations, 200);
    }

}

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

3

Last Release

3871d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b099d1b4f8fba1eab50e3e746a10164dc9e0446769228af3be74f8c1361d2d9?d=identicon)[shekarsiri](/maintainers/shekarsiri)

---

Top Contributors

[![shekarsiri](https://avatars.githubusercontent.com/u/3535027?v=4)](https://github.com/shekarsiri "shekarsiri (17 commits)")

---

Tags

laravelpatternrepositorylaravel 5repositoriesbase repositories

### Embed Badge

![Health badge](/badges/shekarsiri-baserepo/health.svg)

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

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

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

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[lemaur/eloquent-publishing

218.1k1](/packages/lemaur-eloquent-publishing)[dannyweeks/laravel-base-repository

An abstract repository class for your Eloquent repositories that requires minimal config to get started.

202.0k](/packages/dannyweeks-laravel-base-repository)

PHPackages © 2026

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