PHPackages                             innovartingsas/laravel-hexagonal - 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. innovartingsas/laravel-hexagonal

ActiveLibrary

innovartingsas/laravel-hexagonal
================================

Hexagonal architecture for Laravel

V2.1(3y ago)5272MITPHPPHP ^7.3|^8.0|^8.2

Since Feb 24Pushed 2y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Laravel Hexagonal
=================

[](#laravel-hexagonal)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c5ebd58592cf9fa78a0a881d3c93601c2cf74cec31c366c4c678fbbf0df36653/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e6e6f76617274696e677361732f6c61726176656c2d68657861676f6e616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innovartingsas/laravel-hexagonal)[![Total Downloads](https://camo.githubusercontent.com/04316f29e9c9c0f4996c07ca2b6ca52a0a3317d49f099156f576613a5618a1b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e6e6f76617274696e677361732f6c61726176656c2d68657861676f6e616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innovartingsas/laravel-hexagonal)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Laravel package that allows modifying the folder structure proposed by Laravel in its initial installation by a structure based on **Hexagonal Architecture**.

### Install

[](#install)

```
composer require innovartingsas/laravel-hexagonal --dev
```

### Implementation

[](#implementation)

In the root project execute artisan command

```
php artisan hexagonal:install --folder={NAME_FOLDER} --app-namespace={APP_NAMESPACE}
```

Or use the short form

```
php artisan hexagonal:install -f {NAME_FOLDER} -a {APP_NAMESPACE}
```

The namespace is automatically added to the `psr-4` key of the compose.json file.

All files and folders found in the app folder will be moved to the Infrastructure folder found inside the folder defined in the `--folder` option of the package installation command.

---

### File structure created by the package

[](#file-structure-created-by-the-package)

- App Folder Name
    - Application
    - Domain
        - Entities
            - Traits
                - AddProps.php
                - DeleteProps.php
                - Serializable.php
            - BaseEntity.php
            - EntityId.php
    - Infrastructure
        - Console
        - Exceptions
        - Http
        - Models
        - Providers

### Todo List

[](#todo-list)

- Add CommandBus Contract
- Add Command and Handler Interface for UseCases
- Add custom Container Class
- Add binding for a CommandBus and Container Class
- Add Contracts folder inside Domain folder
- Add Repositories folder inside Domain folder
- Add commands for the creation of entities, factories, repositories and use cases.

License
-------

[](#license)

The Laravel Hexagonal Package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Total

2

Last Release

1178d ago

PHP version history (2 changes)V2.0PHP ^7.3|^8.0

V2.1PHP ^7.3|^8.0|^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/55ee1e9ed8c0e9a7d02e9bc87d5f469c4b14683b1afa179a354cf7637de83ed0?d=identicon)[kcifuentes](/maintainers/kcifuentes)

![](https://avatars.githubusercontent.com/u/91914765?v=4)[innovartingsas](/maintainers/innovartingsas)[@innovartingsas](https://github.com/innovartingsas)

---

Top Contributors

[![kcifuentes](https://avatars.githubusercontent.com/u/3731249?v=4)](https://github.com/kcifuentes "kcifuentes (26 commits)")

---

Tags

laravelarchitecturestructurehexagonal

### Embed Badge

![Health badge](/badges/innovartingsas-laravel-hexagonal/health.svg)

```
[![Health](https://phpackages.com/badges/innovartingsas-laravel-hexagonal/health.svg)](https://phpackages.com/packages/innovartingsas-laravel-hexagonal)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[grazulex/laravel-atlas

Laravel Atlas scans your Laravel project to generate a complete, structured map of its internal components — models, controllers, routes, jobs, observers, events, commands, and more — and exports visual or machine-readable representations in formats like Mermaid, Markdown, JSON, or PDF.

161.7k](/packages/grazulex-laravel-atlas)

PHPackages © 2026

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