PHPackages                             jmrashed/laravel-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. jmrashed/laravel-module-generator

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

jmrashed/laravel-module-generator
=================================

A Laravel package to generate and manage modular components effortlessly.

v1.0.0(1y ago)23MITPHPPHP ^7.4 || ^8.0CI failing

Since Apr 8Pushed 1y ago1 watchersCompare

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

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

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

[](#laravel-module-generator)

[![Latest Version](https://camo.githubusercontent.com/d44f49218d5c2600fe31bee2a9a81ae457b917525af6e509bf3a8be2d41c20ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6d7261736865642f6c61726176656c2d6d6f64756c652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jmrashed/laravel-module-generator)[![Build Status](https://camo.githubusercontent.com/780a068c25ba43a96cacc4be42029dfb7a3ba2e5b7e8ad9031c8bc3e4eb64b6c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6d7261736865642f6c61726176656c2d6d6f64756c652d67656e657261746f722f63692e796d6c3f6272616e63683d6d61696e)](https://github.com/jmrashed/laravel-module-generator/actions)[![Total Downloads](https://camo.githubusercontent.com/afee272ac1a2e9fb8c5b8c0bd4dcda0055187873230f0534831c9cd64fdd1d3f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6d7261736865642f6c61726176656c2d6d6f64756c652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jmrashed/laravel-module-generator)[![Test Status](https://camo.githubusercontent.com/7847c2687e4af69e29532ffeb22ecb16dc2b6301bf9379f8d4a25bf9c932ede0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6a6d7261736865642f6c61726176656c2d6d6f64756c652d67656e657261746f722f4349)](https://github.com/jmrashed/laravel-module-generator/actions)[![License](https://camo.githubusercontent.com/be068d8998afe08449dbfdf5b0c66304aecf1bebf1f3f8cfba17510d0e41337c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a6d7261736865642f6c61726176656c2d6d6f64756c652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](LICENSE)

> 🚀 A simple and flexible Laravel package to scaffold modular components with ease and speed.

The **Laravel Module Generator** helps you quickly create fully structured, reusable modules within your Laravel projects — perfect for organizing large applications and promoting clean architecture.

---

📚 Table of Contents
-------------------

[](#-table-of-contents)

- [Features](#-features)
- [Installation](#-installation)
- [Configuration](#-configuration)
- [Usage](#-usage)
    - [Basic Usage](#basic-usage)
    - [Available Options](#available-options)
    - [Real-World Example](#real-world-example)
- [Testing](#-testing)
- [Contributing](#-contributing)
- [License](#-license)

---

✨ Features
----------

[](#-features)

- 📦 Generate Laravel modules with MVC structure
- 🔧 Supports custom namespaces and folder structures
- 🧰 Command-line driven with Artisan commands
- 🔌 Easily customizable and extendable
- 🗂 Keeps your Laravel app clean, modular, and maintainable

---

🛠 Installation
--------------

[](#-installation)

### Via Composer

[](#via-composer)

```
composer require jmrashed/laravel-module-generator --dev
```

> Alternatively, you can clone this repository:

```
git clone git@github.com:jmrashed/laravel-module-generator.git
cd laravel-module-generator
composer install
```

---

### Publish Configuration (Optional)

[](#publish-configuration-optional)

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

This will create a `config/module-generator.php` file where you can customize module settings.

---

⚙️ Configuration
----------------

[](#️-configuration)

You can customize the following in `config/module-generator.php`:

- Base modules path (default: `modules/`)
- Default namespace
- Folder structure (e.g., Controllers, Models, Views, etc.)
- Custom routing configurations
- Middleware and service provider setups

This allows you to adapt the package to fit your project’s architecture standards.

---

🚀 Usage
-------

[](#-usage)

### Basic Usage

[](#basic-usage)

To generate a new module, run:

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

This will scaffold the module with default folders and routing files under `modules/Blog`.

### Available Options

[](#available-options)

OptionDescription`--with-model`Also create a model class for the module`--api`Generate an API-ready module (Controller + Routes)`--force`Overwrite module if it already exists### Real-World Example

[](#real-world-example)

To create an **API** module with a **Blog** model, simply run:

```
php artisan make:module Blog --with-model --api
```

This will create a `Blog` module under `modules/Blog/` with:

- `BlogController.php`
- `Blog.php` model
- `api.php` routes

Example structure:

```
modules/
└── Blog/
    ├── Controllers/
    │   └── BlogController.php
    ├── Models/
    │   └── Blog.php
    ├── Routes/
    │   └── api.php
    └── Views/
        └── index.blade.php

```

---

🧪 Testing
---------

[](#-testing)

To run tests:

```
php artisan test
```

Or directly with PHPUnit:

```
vendor/bin/phpunit
```

---

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! If you'd like to contribute, please follow these steps:

1. **Fork** the repository
2. **Create** your branch (`git checkout -b feature/your-feature-name`)
3. **Commit** your changes (`git commit -am 'Add some feature'`)
4. **Push** to the branch (`git push origin feature/your-feature-name`)
5. **Create a Pull Request**

Please ensure that your code follows [PSR-12](https://www.php-fig.org/psr/psr-12/) coding standards and includes tests for new features.

For more detailed guidelines, please check the [CONTRIBUTING.md](CONTRIBUTING.md) file.

---

📃 License
---------

[](#-license)

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

---

🙌 Acknowledgements
------------------

[](#-acknowledgements)

Built with ❤️ by [Md Rasheduzzaman](https://rasheduzzaman.com).
Follow me on [GitHub](https://github.com/jmrashed) or [Twitter](https://twitter.com/_rasheduzzaman) for more Laravel goodies.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance47

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

396d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/12aeaba318c81d8e123faa3b8961a4e8a1ebf876e2a73b1e1ad08b3e5fc2f901?d=identicon)[jmrashed](/maintainers/jmrashed)

---

Top Contributors

[![jmrashed](https://avatars.githubusercontent.com/u/8583051?v=4)](https://github.com/jmrashed "jmrashed (1 commits)")[![mrazmna](https://avatars.githubusercontent.com/u/202754413?v=4)](https://github.com/mrazmna "mrazmna (1 commits)")

---

Tags

generatorlaravelmodulepackagelaravelgeneratorscaffoldmodulelaravel-moduleJmrashed

### Embed Badge

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

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

###  Alternatives

[zonneplan/laravel-module-loader

Module loader for Laravel

24118.4k](/packages/zonneplan-laravel-module-loader)[dcblogdev/laravel-module-generator

Generate Laravel Modules from a template.

7710.1k1](/packages/dcblogdev-laravel-module-generator)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

295.1k](/packages/linkxtr-laravel-qrcode)

PHPackages © 2026

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