PHPackages                             ikechukwukalu/makeservice - 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. ikechukwukalu/makeservice

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

ikechukwukalu/makeservice
=========================

A laravel package for scaffolding service classes.

v3.0.0(1y ago)59.3k2[2 PRs](https://github.com/ikechukwukalu/makeservice/pulls)1MITPHPPHP &gt;=7.3CI passing

Since Feb 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ikechukwukalu/makeservice)[ Packagist](https://packagist.org/packages/ikechukwukalu/makeservice)[ RSS](/packages/ikechukwukalu-makeservice/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (6)Versions (20)Used By (1)

MAKE SERVICE
============

[](#make-service)

[![Latest Version on Packagist](https://camo.githubusercontent.com/adda8a204630a776b71122d4ffd942005e358008e8913e013de597ddf72d5988/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696b656368756b77756b616c752f6d616b65736572766963653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ikechukwukalu/makeservice)[![Quality Score](https://camo.githubusercontent.com/468ec36c747b36ec726b3e94fb42378ff50d4c39db8cd06b364c3ed1ea2411ef/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f696b656368756b77756b616c752f6d616b65736572766963652f6d61696e3f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ikechukwukalu/makeservice/)[![Code Quality](https://camo.githubusercontent.com/2d279f5fadf49d1eb494dc5b3b3b28078dd03a27bcb77b8e5b50492e0bc59431/68747470733a2f2f696d672e736869656c64732e696f2f636f6465666163746f722f67726164652f6769746875622f696b656368756b77756b616c752f6d616b65736572766963653f7374796c653d666c61742d737175617265)](https://www.codefactor.io/repository/github/ikechukwukalu/makeservice)[![Known Vulnerabilities](https://camo.githubusercontent.com/41eaeb5b53289d2a58529ce72e150f7269bea01ceb862f79799ac367926ea613/68747470733a2f2f736e796b2e696f2f746573742f6769746875622f696b656368756b77756b616c752f6d616b65736572766963652f62616467652e7376673f7374796c653d666c61742d737175617265)](https://security.snyk.io/package/composer/ikechukwukalu%2Fmakeservice)[![Github Workflow Status](https://camo.githubusercontent.com/947678ccf2b5542ab8590f1c2cef0d3aad8b5107f20d1567a89d334a2176484e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696b656368756b77756b616c752f6d616b65736572766963652f6d616b65736572766963652e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/ikechukwukalu/makeservice/actions/workflows/makeservice.yml)[![Total Downloads](https://camo.githubusercontent.com/459dcf29d93fc5045b43a5f064e04e8346856f5c5374a2b57bb8a1fcb5b32b1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696b656368756b77756b616c752f6d616b65736572766963653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ikechukwukalu/makeservice)[![Licence](https://camo.githubusercontent.com/3b33ff1e0d0320ea85b79d33e8fc4f8f046de9dc1dca34bd07633cc060bc6d85/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696b656368756b77756b616c752f6d616b65736572766963653f7374796c653d666c61742d737175617265)](https://github.com/ikechukwukalu/makeservice/blob/main/LICENSE.md)

A laravel package for scaffolding Service, Traits, Enums, Facades, Actions, Repository and Interface classes.

REQUIREMENTS
------------

[](#requirements)

- PHP 7.3+
- Laravel 8+

STEPS TO INSTALL
----------------

[](#steps-to-install)

```
composer require ikechukwukalu/makeservice
```

SERVICE CLASS
-------------

[](#service-class)

To generate a new service class.

```
php artisan make:service SampleService

php artisan make:service SampleService  -f //This will overwrite an existing service class.
```

To generate a new service class for a particular request class.

```
php artisan make:request SampleRequest

php artisan make:service SampleService --request=SampleRequest
```

To generate a service class and a form request class together

```
php artisan make:service SampleService --request=SampleRequest -e
```

TRAIT CLASS
-----------

[](#trait-class)

To generate a new trait class.

```
php artisan make:traitclass SampleTrait

php artisan make:traitclass SampleTrait  -f //This will overwrite an existing trait class.
```

ENUM CLASS
----------

[](#enum-class)

To generate a new enum class.

```
php artisan make:enumclass Sample

php artisan make:enumclass Sample  -f //This will overwrite an existing enum class.
```

ACTION CLASS
------------

[](#action-class)

To generate a new action class.

```
php artisan make:action Sample

php artisan make:action Sample  -f //This will overwrite an existing action class.
```

CONTRACT CLASS
--------------

[](#contract-class)

To generate a new contract/interface class.

```
php artisan make:interfaceclass SampleInterface

php artisan make:interfaceclass SampleInterface  -f //This will overwrite an existing interface  class.
```

REPOSITORY CLASS
----------------

[](#repository-class)

To generate a new repository class for a particular contract/interface class.

```
php artisan make:interfaceclass UserRepositoryInterface --model=User

php artisan make:repository UserRepository --model=User --interface=UserRepositoryInterface

php artisan make:repository UserRepository --model=User --interface=UserRepositoryInterface  -f //This will overwrite an existing repository class.
```

To generate extra fetch by user id methods.

```
php artisan make:interfaceclass UserRepositoryInterface --model=User --user

php artisan make:repository UserRepository --model=User --interface=UserRepositoryInterface --user

php artisan make:repository UserRepository --model=User --interface=UserRepositoryInterface --user  -f //This will overwrite an existing repository class.
```

To generate a repository class and a contract/interface class together

```
php artisan make:repository UserRepository --model=User -c

php artisan make:repository UserRepository --model=User --user -c
```

FACADE CLASS
------------

[](#facade-class)

To generate a new facade class.

```
php artisan make:facade Sample

php artisan make:facade Sample  -f //This will overwrite an existing facade class.
```

To generate a facade class for a repository class

```
php artisan make:facade User --contract=UserRepositoryInterface
```

### Bind the contract and the repository class

[](#bind-the-contract-and-the-repository-class)

The last thing we need to do is bind `UserRepository` to `UserRepositoryInterface` in Laravel's Service Container. We will do this via a Service Provider. Create one using the following command:

```
php artisan make:provider RepositoryServiceProvider
```

Open `app/Providers/RepositoryServiceProvider.php` and update the register function to match the following:

```
public function register()
{
    $this->app->bind(UserRepositoryInterface::class, UserRepository::class);
}
```

Finally, add the new Service Provider to the providers array in `config/app.php`.

```
'providers' => [
    // ...other declared providers
    App\Providers\RepositoryServiceProvider::class,
];
```

### Bind the facade and the action class

[](#bind-the-facade-and-the-action-class)

If we have a `User` facade class and a `UserService` action class, we would need to add it to Laravel's Service Container. Facades for respository classes will work without any extra binding since they have already been added to the container within the `RepositoryServiceProvider` class, but we would always need to register every facade class we created.

Create the provider:

```
php artisan make:provider FacadeServiceProvider
```

Bind the action class:

```
public function register()
{
    $this->app->bind('user', UserService::class);
}
```

Register the providers:

```
'providers' => [
    // ...other declared providers
    App\Providers\FacadeServiceProvider::class,
    App\Providers\RepositoryServiceProvider::class,
];
```

Finally, add the facade to the aliases array in `config/app.php`.

```
    'aliases' => Facade::defaultAliases()->merge([
    // ...other declared facades
        'User' => App\Facades\User::class,
    ])->toArray(),
```

LICENSE
-------

[](#license)

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

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance47

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.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 ~49 days

Recently: every ~38 days

Total

17

Last Release

440d ago

Major Versions

v1.0.7 → v2.0.02024-06-18

v2.0.7 → v3.0.02025-04-21

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v1.0.7PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/160470701?v=4)[ikay007](/maintainers/ikay007)[@Ikay007](https://github.com/Ikay007)

---

Top Contributors

[![monitecture](https://avatars.githubusercontent.com/u/100952206?v=4)](https://github.com/monitecture "monitecture (45 commits)")[![nowodev](https://avatars.githubusercontent.com/u/43044740?v=4)](https://github.com/nowodev "nowodev (8 commits)")[![ikechukwukalu](https://avatars.githubusercontent.com/u/60310041?v=4)](https://github.com/ikechukwukalu "ikechukwukalu (5 commits)")

---

Tags

laravelphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ikechukwukalu-makeservice/health.svg)

```
[![Health](https://phpackages.com/badges/ikechukwukalu-makeservice/health.svg)](https://phpackages.com/packages/ikechukwukalu-makeservice)
```

###  Alternatives

[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[livewire/flux

The official UI component library for Livewire.

9527.8M128](/packages/livewire-flux)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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