PHPackages                             mattyeend/laravel-model-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. mattyeend/laravel-model-service

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

mattyeend/laravel-model-service
===============================

Extends Laravel make:model to also create a service class when using -S flag or --service option.

v1.1.3(2mo ago)19MITPHPPHP &gt;=8.1

Since Aug 23Pushed 2mo agoCompare

[ Source](https://github.com/MatthewYeend/Laravel-Model-Service)[ Packagist](https://packagist.org/packages/mattyeend/laravel-model-service)[ Fund](https://www.buymeacoffee.com/mattyeend)[ GitHub Sponsors](https://github.com/MattYeend)[ RSS](/packages/mattyeend-laravel-model-service/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (5)Used By (0)

Laravel Model Service Generator
===============================

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

Extends Laravel's `make:model` Artisan command to also generate a **Service class** in `app/Services` when using the `-s` (or `--service`) flag.

Features
--------

[](#features)

- Works with **Laravel 10, 11, and 12**
- Fully PSR-4 compliant
- Generates service alongside model, migration, and controller
- Seamlessly integrates with all existing `make:model` options

---

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

[](#installation)

```
composer require mattyeend/laravel-model-service
```

Laravel will auto-discover the service provider.

---

Usage
-----

[](#usage)

```
php artisan make:model Post -mcrS
# -> Creates Post model and PostService
php artisan make:model Post --service
# -> Creates PostService
php artisan make:model Post -a
# -> Creates Post model, migration, controller, factory, seeder, policy,
#    and now also Postervice
```

This will create:

```
app/
    Models/
        Post.php
    Services/
        PostService.php
    Http/
        Controllers/
            PostController.php
database/
    migrations/
        2025_08_15_000000_create_posts_table.php
```

Flags

- `-m` — Create migration
- `-c` — Create controller
- `-r` — Resource controller
- `-S`/`--service` — Create service

---

Customizing the Service Stub
----------------------------

[](#customizing-the-service-stub)

You can publish the stub to modify the generated service file:

```
php artisan vendor:publish --tag=stubs
```

This will place `stubs/service.stub` in your project root. Modify it to fit your coding standards.

---

License
-------

[](#license)

This package is licensed under the MIT License.

---

Contributing
------------

[](#contributing)

Feel free to fork the repository and submit pull requests for improvements or new features!

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance88

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Total

3

Last Release

60d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/280b020ca627b367261832c86f63f9f71076d720e1f8e6c4a7ae2c9c1a77f39e?d=identicon)[MattYeend](/maintainers/MattYeend)

---

Top Contributors

[![MattYeend](https://avatars.githubusercontent.com/u/23270321?v=4)](https://github.com/MattYeend "MattYeend (5 commits)")

---

Tags

composercomposer-packagelaravellaravel-10laravel-11laravel-12laravel-frameworklaravel-modellaravel-model-servicelaravel-packagelaravel10laravel11laravel12modelmodel-servicepackagephpserviceservice-classlaravelpackagemodelserviceLaravel-Model-Service

### Embed Badge

![Health badge](/badges/mattyeend-laravel-model-service/health.svg)

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

###  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)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7012.8k](/packages/tehwave-laravel-achievements)[getsolaris/laravel-make-service

A MVCS pattern create a service command for Laravel 5+

81161.3k](/packages/getsolaris-laravel-make-service)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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