PHPackages                             erfanshk/laravel-layered-logic - 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. erfanshk/laravel-layered-logic

ActiveLibrary[Framework](/categories/framework)

erfanshk/laravel-layered-logic
==============================

Layered Repositories, Services and Interfaces

v0.0.1(1y ago)17MITPHPPHP ^8.2

Since Jul 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/erfanshk/laravel-layered-logic)[ Packagist](https://packagist.org/packages/erfanshk/laravel-layered-logic)[ RSS](/packages/erfanshk-laravel-layered-logic/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Laravel Layered Logic
=====================

[](#laravel-layered-logic)

[![Latest Version](https://camo.githubusercontent.com/cfc33416a556bf70bebb17112874fc527786ac2fdbe544151fdadefe236f59a2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f657266616e73686b2f6c61726176656c2d6c6179657265642d6c6f6769632e7376673f7374796c653d666c61742d737175617265)](https://github.com/erfanshk/laravel-layered-logic/releases)[![run-tests](https://github.com/erfanshk/laravel-layered-logic/actions/workflows/run-tests.yml/badge.svg)](https://github.com/erfanshk/laravel-layered-logic/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/adbe5007f4cb1ab77ed56e38502b0e9fbadafd8084719b334d531f9d2ac3bbe2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f657266616e73686b2f6c61726176656c2d6c6179657265642d6c6f6769632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/erfanshk/laravel-layered-logic)

Under Development - Beta Release
--------------------------------

[](#under-development---beta-release)

A simple package to make repositories , services and their corresponding interfaces for laravel.

### Works on

[](#works-on)

> Laravel ^11.0

### How to Install

[](#how-to-install)

Just run the command below and everything is ready.

```
composer require erfanshk/laravel-layered-logic
```

### How it works

[](#how-it-works)

LayeredLogicInitServiceProvider gets registered on your laravel app, which comes with a simple command

```
php artisan make:layered User
```

It creates the following files:

- App
    - Layers
        - Controllers
            - UserController
            - Requests
                - UserRequest
        - Resources
            - UserResource
            - Collection
                - UserCollection
        - Repositories
            - UserRepository
            - Interfaces
                - UserRepositoryInterface
        - Services
            - UserService
            - Interfaces
                - UserServiceInterface

It also registers repository and service interfaces as singletons in the published LayeredLogicServiceProvider in:

> App\\Providers\\LayeredLogicServiceProvider

The binding array is located in

> config\\layered.php

By running:

```
php artisan make:layered {model}
```

it is automatically registered in the app container. Now you can use your pre-made UserService by injecting the UserServiceInterface anywhere in your application.

### What you get by using this package?

[](#what-you-get-by-using-this-package)

It really depends on what coding style you have. LayeredLogic main objective is to bring abstraction to laravel models and controllers. It also makes the creating and registering of such easy and less time-consuming.

### Development

[](#development)

If you have any ideas to enhance the package, I would be more than happy to hear from you.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

651d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e0bd29893a7128d44c4a62198e73329a2b77ca276830bcc1da43710629b5d3d?d=identicon)[erfanshk](/maintainers/erfanshk)

---

Top Contributors

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

---

Tags

frameworklaravelrepositoryserviceslaravel-repositorylayeredlaravel-serviceslaravel-interfaces

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/erfanshk-laravel-layered-logic/health.svg)

```
[![Health](https://phpackages.com/badges/erfanshk-laravel-layered-logic/health.svg)](https://phpackages.com/packages/erfanshk-laravel-layered-logic)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.

1.5k9.4M48](/packages/laravel-reverb)[laravel/sail

Docker files for running a basic Laravel application.

1.9k186.9M1.0k](/packages/laravel-sail)

PHPackages © 2026

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