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(4mo ago)052MITPHPPHP ^8.2

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

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

38

—

LowBetter than 83% of packages

Maintenance77

Regular maintenance activity

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

123d 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

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M99](/packages/dedoc-scramble)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k38](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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