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.5(2w ago)19MITPHPPHP &gt;=8.1

Since Aug 23Pushed 3mo 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 today

READMEChangelog (3)Dependencies (11)Versions (7)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 84% of packages

Maintenance87

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Total

5

Last Release

19d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23270321?v=4)[Matt Yeend](/maintainers/MattYeend)[@MattYeend](https://github.com/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

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4925.3k](/packages/erag-laravel-lang-sync-inertia)[flarum/core

Delightfully simple forum software.

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

PHPackages © 2026

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