PHPackages                             fatihrizqon/laravel-service-repo-generator - 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. fatihrizqon/laravel-service-repo-generator

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

fatihrizqon/laravel-service-repo-generator
==========================================

Artisan command to generate Service &amp; Repository in Laravel

v1.0.0(4mo ago)111MITPHPPHP ^8.2

Since Jan 2Pushed 4mo agoCompare

[ Source](https://github.com/fatihrizqon/laravel-service-repo-generator)[ Packagist](https://packagist.org/packages/fatihrizqon/laravel-service-repo-generator)[ RSS](/packages/fatihrizqon-laravel-service-repo-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel Service Repository Generator
====================================

[](#laravel-service-repository-generator)

An Artisan command to generate **Service &amp; Repository pattern** in Laravel projects, complete with interfaces and customizable stubs.

✨ Features
----------

[](#-features)

- Generate **Service &amp; Service Interface**
- Generate **Repository &amp; Repository Interface**
- Configurable namespaces
- Customizable stubs via `vendor:publish`
- Laravel auto-discovery support
- Compatible with Laravel 10, 11, and 12

---

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require fatihrizqon/laravel-service-repo-generator
```

The service provider will be automatically registered via Laravel auto-discovery.

---

⚙️ Publish Configuration
------------------------

[](#️-publish-configuration)

(Optional but recommended)

```
php artisan vendor:publish --tag=service-repo-generator-config
```

The configuration file will be published to:

```
config/service-repo-generator.php
```

---

🧱 Publish Stubs (Customize Templates)
-------------------------------------

[](#-publish-stubs-customize-templates)

To customize the service and repository templates:

```
php artisan vendor:publish --tag=service-repo-generator-stubs
```

The stubs will be published to:

```
stubs/service-repo-generator/
```

---

🚀 Usage
-------

[](#-usage)

### Generate a Service

[](#generate-a-service)

```
php artisan create:service User
```

This command will generate:

```
app/Services/UserService.php
app/Services/Interfaces/IUserService.php

```

---

### Generate a Repository

[](#generate-a-repository)

```
php artisan create:repository User
```

This command will generate:

```
app/Repositories/UserRepository.php
app/Repositories/Interfaces/IUserRepository.php

```

---

🛠 Configuration Example
-----------------------

[](#-configuration-example)

```
return [
    'service_namespace' => 'Services',
    'service_interface_namespace' => 'Services\\Interfaces',

    'repository_namespace' => 'Repositories',
    'repository_interface_namespace' => 'Repositories\\Interfaces',
];
```

---

📄 License
---------

[](#-license)

MIT License © 2025
Created by **Fatih Rizqon**

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance76

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

131d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fb402245f242294978c417f7b0e8f0df2816f47eba3a9caec43f8ce96502b54?d=identicon)[fatihrizqon](/maintainers/fatihrizqon)

---

Top Contributors

[![fatihrizqon](https://avatars.githubusercontent.com/u/18120259?v=4)](https://github.com/fatihrizqon "fatihrizqon (7 commits)")

---

Tags

clean-architectureclean-codedesign-patternservice-repository-pattern

### Embed Badge

![Health badge](/badges/fatihrizqon-laravel-service-repo-generator/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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