PHPackages                             innoflash/laravel-design-patterns - 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. innoflash/laravel-design-patterns

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

innoflash/laravel-design-patterns
=================================

Laravel design patterns

23PHP

Since Aug 31Pushed 6y ago1 watchersCompare

[ Source](https://github.com/innoflash/laravel-design-patterns)[ Packagist](https://packagist.org/packages/innoflash/laravel-design-patterns)[ RSS](/packages/innoflash-laravel-design-patterns/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Laravel Design patterns
========================

[](#laravel-design-patterns)

 [![Build Status](https://camo.githubusercontent.com/21924638e1e3f44948048472cbb6b6f8dbf49427330f91296c36c5362fe09605/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d7a65726f2f6672616d65776f726b2f737461626c652e737667)](https://travis-ci.org/laravel-zero/framework) [![Quality Score](https://camo.githubusercontent.com/6bb3ddce13a031e80880e9ffe56960f8b72995b36430e3d6f3db40b6ff172124/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d7a65726f2f6672616d65776f726b2e737667)](https://scrutinizer-ci.com/g/laravel-zero/framework) [![Total Downloads](https://camo.githubusercontent.com/acad6d0070128dde2bf83a2dd6075e40867e723c4cfb67c0ae30442e8c4374c2/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d7a65726f2f6672616d65776f726b2f642f746f74616c2e737667)](https://packagist.org/packages/laravel-zero/framework) [![Latest Stable Version](https://camo.githubusercontent.com/eb6e0c096b32e1b5e43023b1a18428866a28fb0760e621e61df26a2a4596489d/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d7a65726f2f6672616d65776f726b2f762f737461626c652e737667)](https://packagist.org/packages/laravel-zero/framework) [![License](https://camo.githubusercontent.com/b7480d9628a286f15c588a606dc480c7380876ac9aaf1c5357e2716bdfbe8b92/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d7a65726f2f6672616d65776f726b2f6c6963656e73652e737667)](https://packagist.org/packages/laravel-zero/framework)

####  This is a community project and not an official Laravel one

[](#-this-is-a-community-project-and-not-an-official-laravel-one-)

Laravel Design Patterns was created by, and is maintained by [Innocent Mazando](https://github.com/innoflash), and is console application running on composer used to create Laravel Repository and Service pattern.

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

[](#installation)

Install via composer.

Note: For windows user, first run `composer global update`

```
composer global require innoflash/laravel-design-patterns
```

### Create a repository

[](#create-a-repository)

```
ldp pattern:repository {model_name}
```

The `model_name` is the model you wanna create a repository for eg

```
ldp pattern:repository Models/User
```

links a the `App\Models\User`And likewise

```
ldp pattern:repository User

```

links `App\User`Command creates the repo folder under Repositories in the model name folder

[![Repo folder](images/repo_folder.PNG)](images/repo_folder.PNG)

This creates an ModelEloquent file that you are gonna have to override when you are passing your app login

[![Repo Eloquent](images/repo_eloq.PNG)](images/repo_eloq.PNG)

Also it creates an interface that`s used in the Eloquent file. You can add or remove more abstract methods to this to further customize your repo

[![Repo Interface](images/repo_interface.PNG)](images/repo_interface.PNG)

### Create a service

[](#create-a-service)

```
ldp pattern:service {model_name}
```

The `model_name` is the model you wanna create a repository for eg

```
ldp pattern:service Models/User
```

links a the `App\Models\User`And likewise

```
ldp pattern:service User

```

links `App\User`Command creates the service file Services with your model name concatenated with "Service"

[![Service file](images/service_folder.PNG)](images/service_folder.PNG)

This is how the service class created looks like

[![Service stub](images/service_stub.PNG)](images/service_stub.PNG)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8e29b914f8f1d668deae9012300d28e42e540dad3791f76eeb940a81e7447dd?d=identicon)[innoflash](/maintainers/innoflash)

---

Top Contributors

[![innoflash](https://avatars.githubusercontent.com/u/12772919?v=4)](https://github.com/innoflash "innoflash (12 commits)")

### Embed Badge

![Health badge](/badges/innoflash-laravel-design-patterns/health.svg)

```
[![Health](https://phpackages.com/badges/innoflash-laravel-design-patterns/health.svg)](https://phpackages.com/packages/innoflash-laravel-design-patterns)
```

PHPackages © 2026

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