PHPackages                             prjkt/repofuck - 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. prjkt/repofuck

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

prjkt/repofuck
==============

Fucking with the repository design pattern

0.1.24(9y ago)63.2k1[13 issues](https://github.com/prjkt/repofuck/issues)[1 PRs](https://github.com/prjkt/repofuck/pulls)MITPHPPHP &gt;=7.0.0

Since Aug 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/prjkt/repofuck)[ Packagist](https://packagist.org/packages/prjkt/repofuck)[ RSS](/packages/prjkt-repofuck/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (7)Versions (28)Used By (0)

Repofuck
========

[](#repofuck)

[![CircleCI](https://camo.githubusercontent.com/099799b9488433b1c0b73b82b74eeb1e40cc06f7ce8c72cbc9ae6d67647a8a35/68747470733a2f2f636972636c6563692e636f6d2f67682f70726a6b742f7265706f6675636b2e7376673f7374796c653d737667)](https://circleci.com/gh/prjkt/repofuck)

Fucking with the repository design pattern

### Why?

[](#why)

Repofuck is dynamically persistent repository provider that also acts as a factory in runtime. Business logic can be written in the usual way or in closures if additional operations are needed before the data is given out. This eliminates the backdrop of needing predefined repository functions and replacing it by the entities themselves. Repofuck also features a dynamic mass assignment workflow where we can leverage predefined keys from Eloquent's `getFillable` or assign our own keys to be persisted in the repository. This way, when we're about to save the entity. The data itself is already persisted and can be manipulated on the fly for additional operations.

### Sample Usage

[](#sample-usage)

```
$where = [
	['foo', 'LIKE', '%BAR%']
];

$data = $repo->prepare(function ($r) use ($where)
{
	//.. operations here
	$r->entity
		->with('relationship')
		->where($where);

})->get();
```

As you can see above. We are fetching data with the parameters with a relationship. The repository will be persisting the return of the callback and we can perform another operation. In which case we are performing a get.

### Installing

[](#installing)

`composer require prjkt/repofuck`

### Prerequisites

[](#prerequisites)

- PHP v7
- Illuminate v5.1 or v5.2 or v5.3
    - Support
    - Database
    - Container
    - Contracts

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.6% 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 ~9 days

Total

26

Last Release

3376d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4339240?v=4)[rm "rhz"](/maintainers/rmrhz)[@rmrhz](https://github.com/rmrhz)

---

Top Contributors

[![rmrhz](https://avatars.githubusercontent.com/u/4339240?v=4)](https://github.com/rmrhz "rmrhz (279 commits)")[![makoru-hikage](https://avatars.githubusercontent.com/u/18744785?v=4)](https://github.com/makoru-hikage "makoru-hikage (28 commits)")[![jcricaro](https://avatars.githubusercontent.com/u/3194845?v=4)](https://github.com/jcricaro "jcricaro (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/prjkt-repofuck/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.7k](/packages/larastan-larastan)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[illuminate/queue

The Illuminate Queue package.

20432.2M1.5k](/packages/illuminate-queue)

PHPackages © 2026

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