PHPackages                             lowel/laravel-service-maker - 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. lowel/laravel-service-maker

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

lowel/laravel-service-maker
===========================

A package for Laravel 9+ that helps generate layered services according to the Interface-Service-Factory pattern using laravel's built-in DI.

1.0.1(10mo ago)0561MITPHPPHP ^8.3CI failing

Since Jul 6Pushed 9mo agoCompare

[ Source](https://github.com/l0w3l/laravel-service-maker)[ Packagist](https://packagist.org/packages/lowel/laravel-service-maker)[ Docs](https://github.com/l0w3l/laravel-service-maker)[ RSS](/packages/lowel-laravel-service-maker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (14)Versions (4)Used By (0)

Laravel Service/Repository Generator Package
============================================

[](#laravel-servicerepository-generator-package)

This Laravel package provides Artisan commands to quickly generate service and repository classes with their corresponding interfaces and factories following a standardized structure.

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

[](#installation)

1. Install the package via Composer:

```
composer require lowel/laravel-service-maker
```

2. The package will automatically register its service provider. If you need to publish the configuration file:

```
php artisan vendor:publish --provider="Lowel\\LaravelServiceMaker\\LaravelServiceMakerProvider" --tag="config"
```

Commands
--------

[](#commands)

### Create a new service

[](#create-a-new-service)

```
php artisan lowel:make:service {name} {--s|singleton}
```

**Options:**

- `name`: The name of the service (e.g., `Payment` will create `PaymentService`)
- `--s|singleton`: Create the service as a singleton

**Example:**

```
php artisan lowel:make:service Payment
```

This will generate:

- `App/Services/Payment/PaymentService.php`
- `App/Services/Payment/PaymentServiceInterface.php`
- `App/Services/Payment/PaymentServiceFactory.php`

### Create a new repository

[](#create-a-new-repository)

```
php artisan lowel:make:repository {name} {--s|singleton}
```

**Options:**

- `name`: The name of the repository (e.g., `User` will create `UserRepository`)
- `--s|singleton`: Create the repository as a singleton

**Example:**

```
php artisan lowel:make:repository User --singleton
```

This will generate:

- `App/Repositories/User/UserRepository.php`
- `App/Repositories/User/UserRepositoryInterface.php`
- `App/Repositories/User/UserRepositoryFactory.php`

File Structure
--------------

[](#file-structure)

The package follows this directory structure:

```
app/
├── Repositories/
│   ├── {RepositoryName}/
│   │   ├── {RepositoryName}Repository.php
│   │   ├── {RepositoryName}RepositoryInterface.php
│   │   └── {RepositoryName}RepositoryFactory.php
└── Services/
    ├── {ServiceName}/
    │   ├── {ServiceName}Service.php
    │   ├── {ServiceName}ServiceInterface.php
    │   └── {ServiceName}ServiceFactory.php

```

Usage
-----

[](#usage)

After generating the classes, you can use them through Laravel's dependency injection:

```
use App\Services\Payment\PaymentServiceInterface;
use App\Repositories\User\UserRepositoryInterface;
use Illuminate\Support\Facades\App;

// Using app() helper
$service = app(PaymentServiceInterface::class);
$repository = app(UserRepositoryInterface::class);

// Using App facade
$service = App::make(PaymentServiceInterface::class);

// Using constructor injection
public function __construct(
    PaymentServiceInterface $paymentService,
    UserRepositoryInterface $userRepository
) {
    // ...
}
```

The package automatically registers the interfaces in Laravel's container, binding them to their concrete implementations.

Configuration
-------------

[](#configuration)

You can customize the generation behavior by publishing and modifying the package configuration file:

```
php artisan vendor:publish --provider="Lowel\\LaravelServiceMaker\\LaravelServiceMakerProvider" --tag="config"
```

This will create `config/service-maker.php` where you can configure:

- Base paths
- Class mapping
- Formatting

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 9+

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance55

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~0 days

Total

2

Last Release

316d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d110b35da8c87d6303de59bdc352469c2b52c288091dd974beebf464c763fc8?d=identicon)[1ove1](/maintainers/1ove1)

---

Top Contributors

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

---

Tags

laravelgeneratorservicesmakelaravel-service-makerlowel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/lowel-laravel-service-maker/health.svg)

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[keepsuit/laravel-temporal

Laravel temporal.io

4875.0k](/packages/keepsuit-laravel-temporal)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[lara-zeus/popover

Zeus Popover is filamentphp component to show a Popover with custom content in tables and infolist

2968.2k3](/packages/lara-zeus-popover)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)

PHPackages © 2026

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