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

ActiveLibrary

sinclairt/repository
====================

Common queries wrapped up in a base repository class to be extended

1.2.6(8y ago)04011MITPHP

Since Jan 12Pushed 8y agoCompare

[ Source](https://github.com/sinclairt/repository)[ Packagist](https://packagist.org/packages/sinclairt/repository)[ RSS](/packages/sinclairt-repository/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (19)Used By (1)

Repository
==========

[](#repository)

Common queries wrapped up into a class to be extended.

### Installation

[](#installation)

` composer require sinclairt/repository`

`composer install`

### Usage

[](#usage)

All you need to do is create a repository that extends `Sinclair\Repository\Repositories\Repository` and implements the `Sinclair\Repository\Contracts\Repository` and off you go you have access to all the goodness of the repository!

This is a list of all the methods available to you

```
sort
getById
getAll
getAllPaginate
add
getByName
update
destroy
save
firstOrCreate
getArrayForSelect
getArrayForSelectWithTrashed
onlyFillable
getByIdWithTrashed
getAllWithTrashed
getAllPaginatedWithTrashed
restore
search
searchWithTrashed
filter
filterPaginated
setQuery
getQuery

```

F.Y.I All of the queries use Laravel's query builder methods, so be sure that your model class has access to these!

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 54.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 ~29 days

Recently: every ~42 days

Total

18

Last Release

3273d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0dc010eef4e76d1eb705b4f2257422302ada2164add753976f7998d9203b19a?d=identicon)[sinclairt](/maintainers/sinclairt)

---

Top Contributors

[![tom-sinclair](https://avatars.githubusercontent.com/u/23167798?v=4)](https://github.com/tom-sinclair "tom-sinclair (6 commits)")[![sinclairt](https://avatars.githubusercontent.com/u/16877448?v=4)](https://github.com/sinclairt "sinclairt (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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