PHPackages                             ithilbert/module - 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. ithilbert/module

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

ithilbert/module
================

Zum erstellen und verwalten von Modulen

v1.0.0(3mo ago)062MITPHPPHP ^8.2

Since Mar 15Pushed 6d ago1 watchersCompare

[ Source](https://github.com/ITHilbert/module)[ Packagist](https://packagist.org/packages/ithilbert/module)[ Docs](https://www.it-hilbert.com)[ RSS](/packages/ithilbert-module/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (1)Versions (2)Used By (0)

IT-Hilbert Module für Laravel
=============================

[](#it-hilbert-module-für-laravel)

Dieses Paket dient zum Erstellen und Verwalten von Modulen in einer Laravel-Applikation. Es erzeugt Modul-Strukturen nach dem Clean-Architecture-Prinzip (Domain / Application / Infrastructure).

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

[](#installation)

1. Installiere das Paket über Composer:

```
composer require ithilbert/module
```

2. Registriere den ServiceProvider in `config/app.php` (falls Autodiscovery nicht genutzt wird):

```
ITHilbert\Module\ModuleServiceProvider::class,
```

3. Veröffentliche die Konfiguration:

```
php artisan vendor:publish --provider="ITHilbert\Module\ModuleServiceProvider"
```

Modul-Speicherort
-----------------

[](#modul-speicherort)

Module werden unter `/module/{name}/` (Projektroot, kleingeschrieben) abgelegt — **nicht** unter `app/Modules/`.

In der `composer.json` des Projekts muss der PSR-4-Eintrag ergänzt werden:

```
"autoload": {
    "psr-4": {
        "Module\\": "module/"
    }
}
```

Erzeugte Verzeichnisstruktur
----------------------------

[](#erzeugte-verzeichnisstruktur)

```
module/{name}/
├── config/
├── controllers/               # Dünne HTTP-Controller (5–10 Zeilen/Methode)
├── database/
│   ├── migrations/
│   └── seeders/
├── routes/
│   └── web.php
├── resources/
│   ├── lang/de/
│   ├── lang/en/
│   └── views/
├── public/
│
├── Domain/                    # Fachdomäne — kennt weder HTTP noch DB-Details
│   ├── Models/                # Eloquent-Models (final, $fillable, SoftDeletes)
│   ├── Enums/                 # Backed Enums für fachliche Zustände
│   ├── ValueObjects/          # Wertobjekte (final readonly)
│   ├── Events/                # Domain-Events
│   └── Exceptions/            # Fachliche Exceptions
│
├── Application/               # Anwendungsfälle — orchestriert Domain
│   ├── UseCases/              # Ein UseCase = ein Anwendungsfall (final, execute())
│   ├── Ports/                 # Interfaces für externe Dienste
│   ├── DTOs/                  # Datentransfer-Objekte (final readonly)
│   └── Requests/              # Form Requests (Validierung)
│
└── Infrastructure/            # Implementierungen der Ports
    ├── Adapters/              # Konkrete Adapter (Mail, Payment, Storage ...)
    └── Repositories/          # Eloquent-Repository-Implementierungen

```

Namespace-Konvention
--------------------

[](#namespace-konvention)

```
Module\\Domain\Models\
Module\\Domain\Enums\
Module\\Application\UseCases\
Module\\Application\Ports\
Module\\Infrastructure\Adapters\
Module\\Controllers\

```

Artisan Befehle
---------------

[](#artisan-befehle)

### Modul-Verwaltung

[](#modul-verwaltung)

- `php artisan module:create {Name}`: Erstellt eine neue Modul-Struktur unter `/module/{name}/` inklusive aller Clean-Architecture-Schichten.
- `php artisan module:set {Name}`: Setzt das Modul, mit dem aktuell gearbeitet wird.
- `php artisan module:get`: Zeigt den Namen des aktuell gesetzten Moduls an.

### Generatoren (beziehen sich auf das aktive Modul)

[](#generatoren-beziehen-sich-auf-das-aktive-modul)

- `php artisan module:model {Name}`: Erstellt ein Model im aktiven Modul (`Domain/Models/`).
- `php artisan module:controller {Name}`: Erstellt einen dünnen Controller im aktiven Modul.
- `php artisan module:migration {Name}`: Erstellt eine Migration für das aktive Modul.
- `php artisan module:view {Name}`: Erstellt eine Blade-View im Modul.
- `php artisan module:config {Name}`: Erstellt eine Konfigurationsdatei für das Modul.

Konfiguration
-------------

[](#konfiguration)

In der `config/module.php` können Standard-CSS-Klassen für generierte Formulare und Komponenten festgelegt werden:

- `row_classes`: Klassen für Reihen.
- `col_label_classes`: Klassen für Label-Spalten.
- `col_input_classes`: Klassen für Input-Spalten.

Architektur-Regeln (bindend)
----------------------------

[](#architektur-regeln-bindend)

- **Controller dünn:** max. 5–10 Zeilen pro Methode, delegiert immer an einen UseCase.
- **UseCases:** `final`-Klasse, eine `execute()`-Methode = ein Anwendungsfall.
- **Models:** `final`, `$fillable` (kein `$guarded`), `SoftDeletes`, kein Geschäftslogik.
- **Enums** statt magischer Strings für fachliche Zustände.
- **Form Requests** für alle Validierungen — kein `$request->all()`.
- **Ports + Adapters** für externe Dienste (Mail, Payment, Storage etc.).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

110d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/86378a339ef2f2a6b6dc13256925d271de7af518a4ee1dfef913b75868d3640c?d=identicon)[ithilbert](/maintainers/ithilbert)

---

Top Contributors

[![ITHilbert](https://avatars.githubusercontent.com/u/46783454?v=4)](https://github.com/ITHilbert "ITHilbert (15 commits)")

---

Tags

laravelhomepageit-hilbert

### Embed Badge

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

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

###  Alternatives

[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

43311.2k](/packages/venturedrake-laravel-crm)[oat-sa/tao-core

TAO core extension

66143.7k124](/packages/oat-sa-tao-core)[ronasit/laravel-helpers

Provided helpers function and some helper class.

2085.6k31](/packages/ronasit-laravel-helpers)[ronasit/laravel-entity-generator

Provided console command for generating entities.

2053.1k](/packages/ronasit-laravel-entity-generator)

PHPackages © 2026

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