PHPackages                             sertsoft/module-generator - 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. [Framework](/categories/framework)
4. /
5. sertsoft/module-generator

ActiveLibrary[Framework](/categories/framework)

sertsoft/module-generator
=========================

Generate scaffold for Laravel &gt;= 11.0

0.0.1(3mo ago)019MITPHP

Since Mar 20Pushed 3mo agoCompare

[ Source](https://github.com/Matheusouza2/laravel-module-generator)[ Packagist](https://packagist.org/packages/sertsoft/module-generator)[ RSS](/packages/sertsoft-module-generator/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

[![Packagist Version](https://camo.githubusercontent.com/13b19ec95f41987e7228fc439130bb4c3c98defde4d6d0f3e040df357739bef8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73657274736f66742f6d6f64756c652d67656e657261746f72)](https://camo.githubusercontent.com/13b19ec95f41987e7228fc439130bb4c3c98defde4d6d0f3e040df357739bef8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73657274736f66742f6d6f64756c652d67656e657261746f72)[![Laravel](https://camo.githubusercontent.com/0171c541f6433dcec81b1736e87bba993ce6d1b126d0954ece853c872cc659f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31312532422d726564)](https://camo.githubusercontent.com/0171c541f6433dcec81b1736e87bba993ce6d1b126d0954ece853c872cc659f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31312532422d726564)[![PHP](https://camo.githubusercontent.com/83dd395020c37276225039739320f6c8e7e99963ab21ee3d09282cb48dad2a60/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c7565)](https://camo.githubusercontent.com/83dd395020c37276225039739320f6c8e7e99963ab21ee3d09282cb48dad2a60/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c7565)[![License](https://camo.githubusercontent.com/ba405aa3528a7102d6c283fe433cd8791433f3e0b9810de52979f8fe20e64be2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73657274736f66742f6d6f64756c652d67656e657261746f72)](https://camo.githubusercontent.com/ba405aa3528a7102d6c283fe433cd8791433f3e0b9810de52979f8fe20e64be2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73657274736f66742f6d6f64756c652d67656e657261746f72)[![Downloads](https://camo.githubusercontent.com/d5a4b1938ba1384903406ead3aa06d0b75398c88105d03865e3251cb956b9859/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73657274736f66742f6d6f64756c652d67656e657261746f72)](https://camo.githubusercontent.com/d5a4b1938ba1384903406ead3aa06d0b75398c88105d03865e3251cb956b9859/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73657274736f66742f6d6f64756c652d67656e657261746f72)

Laravel Module Generator
========================

[](#laravel-module-generator)

A powerful scaffolding package for Laravel 11+ that accelerates development by generating a complete modular structure following clean architecture principles.

This package allows you to create Models, Controllers, DTOs, Services, Repositories, and more — all with a single command.

---

⚠️ Requirements
---------------

[](#️-requirements)

PHP 8.1+

Laravel 11+

---

🚀 Features
----------

[](#-features)

- Generate full modules with one command
- Clean Architecture structure (DTO, Service, Repository)
- Automatic Repository ↔ Interface binding
- Customizable stubs
- Plug-and-play installation
- Laravel 11+ support

---

💡 Best Practices
----------------

[](#-best-practices)

Use Service layer for business logic

Keep Controllers thin

Use DTOs for data transfer

Use Repositories for data abstraction

---

📦 Installation
--------------

[](#-installation)

Require the package via Composer:

```
composer require sertsoft/module-generator
```

⚙️ Setup
--------

[](#️-setup)

Run the installation command:

```
php artisan module:install
```

This will:

Create App\\Providers\\RepositoryServiceProvider

Register the provider in bootstrap/providers.php

Publish configuration and stubs (if configured)

🧱 Usage
-------

[](#-usage)

### Create a Full Module

[](#create-a-full-module)

```
php artisan make:module User
```

This command will generate:

```
app/Models/User.php
app/Http/Controllers/UserController.php
app/Http/Resources/UserResource.php
app/DTO/UserDTO.php
app/Services/UserService.php
app/Repositories/User/UserRepository.php
app/Repositories/User/UserRepositoryInterface.php
```

And automatically bind:

```
UserRepositoryInterface::class => UserRepository::class
```

Inside

```
App\Providers\RepositoryServiceProvider
```

🧩 Available Commands
--------------------

[](#-available-commands)

CommandDescription`make:module {name}`Create full module`make:dto {name}`Create DTO`make:service {name}`Create Service`make:repository {name}`Create Repository + Interface`module:install`Setup provider and configuration⚙️ Configuration
----------------

[](#️-configuration)

Publish the config file:

```
php artisan vendor:publish --tag=module-generator-config
```

Example configuration:

```
return [

    'namespace' => 'App',

    'paths' => [
        'dto' => app_path('DTO'),
        'service' => app_path('Services'),
        'repository' => app_path('Repositories'),
    ],

    'namespaces' => [
        'dto' => 'App\\DTO',
        'service' => 'App\\Services',
        'repository' => 'App\\Repositories',
    ],

    'stubs_path' => base_path('stubs/module-generator'),

    'auto_bind_repository' => true,
];
```

🧾 Stubs Customization
---------------------

[](#-stubs-customization)

Publish stubs:

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

Then edit

```
stubs/module-generator/
```

You can fully customize:

- DTO structure
- Service layer
- Repository pattern
- Naming conventions

🔗 Repository Binding
--------------------

[](#-repository-binding)

The package automatically registers bindings like:

```
$this->app->bind(
    UserRepositoryInterface::class,
    UserRepository::class
);
```

No manual configuration needed.

---

🛠 Roadmap
---------

[](#-roadmap)

- Auto CRUD generation
- Request validation generation
- Policy generation
- Test scaffolding
- Inertia / API mode support

---

🤝 Contributing
==============

[](#-contributing)

Pull requests are welcome!

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance82

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

95d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b8336c3b87489cc914cf1e0196757ecc63b63c211845e1e3461e40cdebb3f1f?d=identicon)[SertSoft](/maintainers/SertSoft)

---

Top Contributors

[![Matheusouza2](https://avatars.githubusercontent.com/u/17604633?v=4)](https://github.com/Matheusouza2 "Matheusouza2 (1 commits)")

### Embed Badge

![Health badge](/badges/sertsoft-module-generator/health.svg)

```
[![Health](https://phpackages.com/badges/sertsoft-module-generator/health.svg)](https://phpackages.com/packages/sertsoft-module-generator)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M829](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[pinguo/php-msf

Pinguo Micro Service Framework For PHP

1.7k4.2k](/packages/pinguo-php-msf)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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