PHPackages                             lauchoit/laravel-hex-mod - 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. lauchoit/laravel-hex-mod

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

lauchoit/laravel-hex-mod
========================

Modular scaffolding generator for Laravel (Hexagonal Architecture)

v1.0.2(7mo ago)026MITPHPPHP ^8.2

Since Jun 24Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/lauchoit/laravel-hex-mod)[ Packagist](https://packagist.org/packages/lauchoit/laravel-hex-mod)[ RSS](/packages/lauchoit-laravel-hex-mod/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (8)Used By (0)

 [![LauchoIT Logo](src/assets/logo_lauchoit.jpg)](src/assets/logo_lauchoit.jpg)

Laravel Hex Mod
===============

[](#laravel-hex-mod)

> ⚙️ *A modular scaffolding generator for Laravel based on Hexagonal Architecture (Ports &amp; Adapters).*

[![License](https://camo.githubusercontent.com/b24bf3b53ce80eff3d4da2843fa3e8e9fefec293e50048967b72c310b07ea5cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4c617563686f49542f6c61726176656c2d6865782d6d6f642e737667)](https://github.com/LauchoIT/laravel-hex-mod/blob/main/LICENSE)[![Packagist](https://camo.githubusercontent.com/fcf46caa2060ccc2a69a64f7817d981cb98677e0598983017568bda423b0ec1e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c617563686f69742f6c61726176656c2d6865782d6d6f642e737667)](https://packagist.org/packages/lauchoit/laravel-hex-mod)[![Made by LauchoIT](https://camo.githubusercontent.com/da100135c4be999a6e896cb3747d666221041de47699eea25087c879cc79da66/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61646525323062792d4c617563686f49542d626c7565)](https://lauchoit.com)

---

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

[](#-installation)

You can install the package via Composer:

```
composer require lauchoit/laravel-hex-mod --dev
```

🚀 What It Does
--------------

[](#-what-it-does)

This package generates a modular Laravel structure based on **Hexagonal Architecture**, automating the creation of:

- ✅ Domain Entities &amp; EntitySource (Model of Laravel)
- ✅ Application UseCases
- ✅ Interface Adapters (Controllers, Repositories, Requests, Resources)
- ✅ Eloquent Models, Migrations, and Factories
- ✅ Automatic Unit &amp; Feature Tests
- ✅ Route injection &amp; AppServiceProvider bindings
- ✅ Shared folder

🚀 What It Does
--------------

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

This package scaffolds a complete Laravel module following **Hexagonal Architecture**, including:

```
src
├── Client
│   ├── Application
│   │   └── UseCases
│   │       ├── CreateClientUseCase.php
│   │       ├── DeleteByIdClientUseCase.php
│   │       ├── FindAllClientUseCase.php
│   │       ├── FindByIdClientUseCase.php
│   │       └── UpdateByIdClientUseCase.php
│   ├── Domain
│   │   ├── Entity
│   │   │   ├── Client.php
│   │   │   └── ClientSource.php
│   │   ├── Exceptions
│   │   │   └── ClientNotFoundException.php
│   │   ├── Mappers
│   │   │   └── ClientMapper.php
│   │   └── Repository
│   │       └── ClientRepository.php
│   ├── Infrastructure
│   │   ├── Controllers
│   │   │   └── ClientController.php
│   │   ├── Model
│   │   │   └── Client.php
│   │   ├── Repository
│   │   │   ├── ClientRepositoryImpl.php
│   │   │   └── UseCases
│   │   │       ├── CreateClientUseCaseImpl.php
│   │   │       ├── DeleteByIdClientUseCaseImpl.php
│   │   │       ├── FindAllClientUseCaseImpl.php
│   │   │       ├── FindByIdClientUseCaseImpl.php
│   │   │       └── UpdateByIdClientUseCaseImpl.php
│   │   ├── Requests
│   │   │   ├── CreateClientRequest.php
│   │   │   └── UpdateClientRequest.php
│   │   ├── Resources
│   │   │   └── ClientResource.php
│   │   └── Routes
│   │       └── ClientRoutes.php
│   └── Tests
│       ├── Feature
│       │   ├── CreateClientTest.php
│       │   ├── DeleteByIdClientTest.php
│       │   ├── FindAllClientTest.php
│       │   ├── FindByIdClientTest.php
│       │   └── UpdateByIdClientTest.php
│       └── Unit
│           └── Domain
│               ├── Entity
│               │   ├── ClientSourceTest.php
│               │   └── ClientTest.php
│               └── Exceptions
│                   └── ClientNotFoundExceptionTest.php
└── Shared
    └── Responses
        ├── ApiResponse.php
        └── ValidationResponse.php
```

### 🧱 Usage

[](#-usage)

You can run the command in different ways depending on your needs:

#### Basic Usage

[](#basic-usage)

```
php artisan make:hex-mod client
```

This command will generate a complete module for `Client` with default fields `attribute1 and attribute2` all string.

#### With fields Usage

[](#with-fields-usage)

```
php artisan make:hex-mod client -f name,lastname,direction,description
```

This command will generate a complete module for `Client` with specific field, if your not provider type, the system makes field with a string type.

#### With fields and type Usage

[](#with-fields-and-type-usage)

```
php artisan make:hex-mod client -f name,lastname,direction,year:integer,registred_at:date,data:json,metadata:json
```

The type available are: `string`, `integer`, `float`, `boolean`, `date`, `datetime`, `json`, `longText`.

This command will generate a complete module for `Client` with specific field and type, if your not provider types, the system makes field with a string type.

#### Without Tests

[](#without-tests)

```
php artisan make:hex-mod client --skip-test
```

If you provide the `--skip-test` option, the generator will skip creating tests for the module.

Route
-----

[](#route)

The generator automatically creates a route file for the module, which you can find in `src/Client/Infrastructure/Routes/ClientRoutes.php`.

- You can customize the routes as needed, and they will be automatically loaded by the application.
- This route file is register automatically in the `bootstrap/app.php` of your Laravel application.
- You can see the routes in the `php artisan route:list` command.

🧪 Test Coverage
---------------

[](#-test-coverage)

Note: you need to have the `phpunit` package installed and configured in your Laravel project to run the tests. You need run migratrions before runnig the tests. The generator produces unit and feature tests for:

- Entity classes
- NotFound exceptions
- UsesCases feature scenarios

Run your tests:

```
php artisan test
```

🙌 Made with ❤️ by [LauchoIT](https://lauchoit.com)
--------------------------------------------------

[](#-made-with-️-by-lauchoit)

Feel free to contribute or suggest features via GitHub issues or PRs.

📜 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance64

Regular maintenance activity

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Recently: every ~25 days

Total

7

Last Release

220d ago

Major Versions

v0.9.5-RC → v1.0.02025-06-25

PHP version history (2 changes)v0.9.1.x-devPHP ^8.1

v1.0.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/139e2a0a010f158ece31676b17010e0834ee2662e703116e16759196d5470ee2?d=identicon)[lauchoit](/maintainers/lauchoit)

---

Top Contributors

[![lauchoit](https://avatars.githubusercontent.com/u/20176851?v=4)](https://github.com/lauchoit "lauchoit (62 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lauchoit-laravel-hex-mod/health.svg)

```
[![Health](https://phpackages.com/badges/lauchoit-laravel-hex-mod/health.svg)](https://phpackages.com/packages/lauchoit-laravel-hex-mod)
```

PHPackages © 2026

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