PHPackages                             yaza/laravel-repository-service - 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. yaza/laravel-repository-service

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

yaza/laravel-repository-service
===============================

Simple repository, service pattern for laravel

V7.0.0(1mo ago)14441.2k↓30%342MITPHPPHP ^8.3

Since Oct 28Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/yaza-putu/laravel-repository-with-service)[ Packagist](https://packagist.org/packages/yaza/laravel-repository-service)[ Docs](https://github.com/yaza-putu/laravel-repository-with-service.git)[ RSS](/packages/yaza-laravel-repository-service/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (26)Versions (40)Used By (2)

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.3

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

[](#installation)

You can install the package via composer for latest version

```
$ composer require yaza/laravel-repository-service
```

Specific Version :

Laravel VersionPackage Version137.x126.x115.x104.093.2```
# for laravel 11
$ composer require yaza/laravel-repository-service:"^5.0"
```

Publish the config file with (Important):

```
php artisan vendor:publish --provider="LaravelEasyRepository\LaravelEasyRepositoryServiceProvider" --tag="easy-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

63

—

FairBetter than 99% of packages

Maintenance89

Actively maintained with recent releases

Popularity47

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 98.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 ~44 days

Recently: every ~182 days

Total

38

Last Release

57d ago

Major Versions

V2.1.2 → V3.2.12022-07-08

V3.2.7 → V4.0.02023-02-26

V4.0.0 → V5.0.02024-04-14

V5.1.0 → V6.0.02025-03-12

V6.0.1 → V7.0.02026-05-09

PHP version history (6 changes)V1.1.2PHP ^7.4|^8.0

V2.0.0PHP ^8.0|^8.1

V4.0.0PHP ^8.1

V5.0.0PHP ^8.2

V6.0.0PHP ^8.4

V7.0.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/437346?v=4)[Troy](/maintainers/yaza)[@yaza](https://github.com/yaza)

---

Top Contributors

[![yaza-putu](https://avatars.githubusercontent.com/u/59905886?v=4)](https://github.com/yaza-putu "yaza-putu (145 commits)")[![BadJacky](https://avatars.githubusercontent.com/u/113529280?v=4)](https://github.com/BadJacky "BadJacky (1 commits)")[![yasa32putu](https://avatars.githubusercontent.com/u/169970895?v=4)](https://github.com/yasa32putu "yasa32putu (1 commits)")

---

Tags

laravel-repositorylaravel-repository-patternlaravel-repository-servicelaravel-servicelaravellaravel-repositorylaravel-repository-service

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/yaza-laravel-repository-service/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

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

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

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