PHPackages                             diouma/laravel-add-service - 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. diouma/laravel-add-service

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

diouma/laravel-add-service
==========================

Générez des services et des interfaces dans Laravel avec la commande artisan

00PHP

Since Nov 4Pushed 2y agoCompare

[ Source](https://github.com/Bmd-Technologies/laravel-add-service)[ Packagist](https://packagist.org/packages/diouma/laravel-add-service)[ RSS](/packages/diouma-laravel-add-service/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

What does it do?
----------------

[](#what-does-it-do)

This package adds a new `php artisan make:service {name} {--N|noInterface}` command. It will create a service file and its (interface) for saving time while working with Laravel Framework and benefit from the **Service Pattern**.

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

[](#installation)

You can install the package via composer:

```
composer require diouma/laravel-add-service --dev
```

How does it work?
-----------------

[](#how-does-it-work)

After installation, the command `php artisan make:service {name} {--N|noInterface}` will be available.

### Create services files

[](#create-services-files)

For example, the command `php artisan make:service createUser` will generate a service file called `CreateUserService.php` located in `app/Services/CreateUser`.

It will also generate an interface called `CreateUserContract.php` located in `app/Services/Interfaces`.

### Create services for models

[](#create-services-for-models)

Adding a `--service` or `-S` option is now available when creating a model.

For example, the command `php artisan make:model Book --service` or `php artisan make:model Book -S` will generate a model with service too.

The command `php artisan make:model Book --all` or `php artisan make:model Book -a` will now generate a model, migration, factory, seeder, policy, controller, form requests and service.

### Contracts

[](#contracts)

Adding a `--noInterface` or `-N` option will prevent the commands from implementing any contract and will not create any contract file.

If you never need any contracts. Publish the config file and then turn the **with\_interface** value to false in the config file.

Configuration file
------------------

[](#configuration-file)

You can publish the config file with:

```
php artisan vendor:publish --tag="service-add-config"
```

This is the content of the published config file:

```
return [
    'with_interface' => true,
];
```

Credits
-------

[](#credits)

- [Mamadou Diouma II Bah](https://github.com/Bmd-Technologies)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% 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/87b5833ed1939d5ef7f08d555f7463fe8f5d562d33006664ac3ddf881057f67f?d=identicon)[diouma](/maintainers/diouma)

---

Top Contributors

[![dioumahb](https://avatars.githubusercontent.com/u/51532564?v=4)](https://github.com/dioumahb "dioumahb (3 commits)")[![Diouma93](https://avatars.githubusercontent.com/u/81175288?v=4)](https://github.com/Diouma93 "Diouma93 (1 commits)")

### Embed Badge

![Health badge](/badges/diouma-laravel-add-service/health.svg)

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

PHPackages © 2026

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