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(2mo ago)015MITPHPPHP ^8.2

Since Feb 2Pushed 2mo 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 1mo 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

40

—

FairBetter than 87% of packages

Maintenance92

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

68d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/362952acb1b988b42cae20227cdf551347dfdd563d2e0fd019864db9530e2133?d=identicon)[itmm](/maintainers/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

[lunarstorm/laravel-ddd

A Laravel toolkit for Domain Driven Design patterns

17959.0k](/packages/lunarstorm-laravel-ddd)[bezhansalleh/filament-plugin-essentials

A collection of essential traits that streamline Filament plugin development by taking care of the boilerplate, so you can focus on shipping real features faster

27584.7k16](/packages/bezhansalleh-filament-plugin-essentials)[vormkracht10/laravel-mails

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

24149.7k](/packages/vormkracht10-laravel-mails)[yaza/laravel-repository-service

Simple repository, service pattern for laravel

14337.9k2](/packages/yaza-laravel-repository-service)[jonpurvis/squeaky

A Laravel Validation Rule to Help Catch Profanity.

706.0k](/packages/jonpurvis-squeaky)

PHPackages © 2026

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