PHPackages                             khaledneam/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. khaledneam/module-generator

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

khaledneam/module-generator
===========================

A Laravel package to generate module structures.

v1.0.1(1y ago)491MITPHPPHP &gt;=7.3

Since Aug 31Pushed 1y ago2 watchersCompare

[ Source](https://github.com/khaledneam/Laravel-Module-Generator)[ Packagist](https://packagist.org/packages/khaledneam/module-generator)[ RSS](/packages/khaledneam-module-generator/feed)WikiDiscussions main Synced 1mo ago

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

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

[](#laravel-module-generator)

A Laravel package to quickly generate modular components such as Controllers, Models, Views, Repositories, and Services. This package helps in creating a modular structure in Laravel applications, making the code more organized and manageable.

Features
--------

[](#features)

- Create directories for Controllers, Models, Requests, Routes, Views, Migrations, Tests, Providers, Repositories, and Services.
- Generate Service Providers, Controllers, Views, Routes, Repositories, and Services files with basic templates.
- Automatically register the Service Provider in `config/app.php`.
- Automatically include module routes in `routes/web.php`.
- Update `helpers.php` file to include `module_path` function.

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

[](#installation)

1. **Install the package via Composer:**

    ```
    composer require khaledneam/module-generator dev-main --dev
    ```
2. Ensure you also add the **Modules** directory in the root of your Laravel project
3. If you do not have **helpers.php** in your app directory, create it as an empty file
4. Update composer.json

```
{
    "autoload": {
        "psr-4": {
            "Modules\\": "Modules/"
        }
    },
    "files": [
        "app/helpers.php"
    ]
}

```

Then, update Composer’s autoload files:

```
composer dump-autoload
```

Usage To create a new module, use the following Artisan command:

```
php artisan make:module ModuleName
```

Example

```
php artisan make:module Blog
```

This will create a new module named Blog with the following structure:

```
Modules/
    Blog/
        Controllers/
        Models/
        Requests/
        Routes/
        Views/
        Migrations/
        Tests/
        Providers/
        Repositories/
        Services/
```

Generated Files

```
Service Provider: Modules/ModuleName/Providers/ModuleNameServiceProvider.php
Controller: Modules/ModuleName/Controllers/ModuleNameController.php
View: Modules/ModuleName/Views/index.blade.php
Route File: Modules/ModuleName/Routes/web.php
Repository: Modules/ModuleName/Repositories/ModuleNameRepository.php
Service: Modules/ModuleName/Services/ModuleNameService.php
```

Important Notes

```
1.Register the Service Provider:

```

Ensure that you add the newly created module's service provider to the providers array in config/app.php:

```
'providers' => [
    // Other Service Providers
    Modules\ModuleName\Providers\ModuleNameServiceProvider::class,
],
```

Contributing

```
Feel free to fork the repository and submit pull requests. Any contributions are welcome.

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

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

Every ~0 days

Total

2

Last Release

625d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a3757c5971065f626db243c348d782d5824225a3c6a177fdce66b827bf1f1e7?d=identicon)[khaledneam](/maintainers/khaledneam)

---

Top Contributors

[![khaledneam](https://avatars.githubusercontent.com/u/66442597?v=4)](https://github.com/khaledneam "khaledneam (7 commits)")

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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