PHPackages                             itmm/easy-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. [Framework](/categories/framework)
4. /
5. itmm/easy-repository

ActiveLibrary[Framework](/categories/framework)

itmm/easy-repository
====================

Simple repository, service pattern for laravel

v1.0.1(5mo ago)056MITPHPPHP ^8.2

Since Feb 2Pushed 5mo agoCompare

[ Source](https://github.com/itmmganteng/easy-service-repository)[ Packagist](https://packagist.org/packages/itmm/easy-repository)[ Docs](https://github.com/itmmganteng/easy-service-repository.git)[ RSS](/packages/itmm-easy-repository/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (13)Versions (3)Used By (0)

Simple repository pattern for laravel, with services!
=====================================================

[](#simple-repository-pattern-for-laravel-with-services)

With easy repository, you can have the power of the repository pattern, without having to write too much code altogether. The package automatically binds the interfaces to the implementations, all you have to do is change in the configuration which implementation is being used at the moment!

Requirement
-----------

[](#requirement)

- Minimum PHP ^8.2

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

[](#installation)

You can install the package via composer for latest version

```
$ composer require itmm/easy-repository
```

Specific Version :

Laravel VersionPackage Version121.xPublish the config file with (Important):

```
php artisan vendor:publish --provider="Itmm\EasyRepository\EasyRepositoryServiceProvider" --tag="itmm-repository-config"
```

Quick usage
-----------

[](#quick-usage)

You can also create only the repository, or service, or both with artisan:

```
php artisan make:repository User
// or
php artisan make:repository UserRepository

// or create together with a service
php artisan make:repository User --service
// or
php artisan make:repository UserRepository --service

// or create a service separately
php artisan make:service User
// or
php artisan make:service UserService
// or
php artisan make:service UserService --repository

// create service with blank template
php artisan make:service UserService --blank
```

How to change bind interface to new class implementation
--------------------------------------------------------

[](#how-to-change-bind-interface-to-new-class-implementation)

Add this config to AppServiceProvider :

```
$this->app->extend(Interface::class, function ($service, $app) {
    return new NewImplement($service);
});
```

Documentation
=============

[](#documentation)

Note : When you create service the default used api template,in api template use setter getter data inside service for how to use you can look in src/Traits/ResultService.php, if you need blank template when create service, you need add argument --blank, ex : php artisan make:service User --blank.

example setter getter service with api template

```
// getter (on service called)
$serviceName->getData()
$serviceName->getCode()
$serviceName->getMessage()
$serviceName->getError()
// setter (in service)
$this->setCode()
$this->setData()
$this->setError()
$this->setMessage()
```

More details will be explained in docs version 6.

Go to guide [Docs V6](https://yaza-putu.github.io/laravel-service-repository-pattern-guide/)

Changelog
---------

[](#changelog)

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

License
-------

[](#license)

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

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance70

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

2

Last Release

169d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4102733?v=4)[Timm Knape](/maintainers/itmm)[@itmm](https://github.com/itmm)

---

Top Contributors

[![dwisupartama](https://avatars.githubusercontent.com/u/52822883?v=4)](https://github.com/dwisupartama "dwisupartama (2 commits)")

---

Tags

laravellaravel-repositorylaravel-repository-service

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.2k12.6M140](/packages/dedoc-scramble)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17861.9k3](/packages/stephenjude-filament-jetstream)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

25060.1k](/packages/vormkracht10-laravel-mails)[elegantly/laravel-translator

All on one translations management for Laravel

6339.5k](/packages/elegantly-laravel-translator)

PHPackages © 2026

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