PHPackages                             phpsamurai/laravel-module-maker - 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. phpsamurai/laravel-module-maker

ActiveLibrary

phpsamurai/laravel-module-maker
===============================

A Laravel package for generating modular HMVC structures with artisan commands

1.0.2(7mo ago)00MITPHPPHP ^8.2

Since Oct 7Pushed 7mo agoCompare

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

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

🏗️ Laravel Module Maker
=======================

[](#️-laravel-module-maker)

### Transform Your Laravel App into a Modular Masterpiece

[](#transform-your-laravel-app-into-a-modular-masterpiece)

[![License: MIT](https://camo.githubusercontent.com/1b01ef0024ba0866c115986b895301f657c1b21fc29f05c4844b7f2e8d89204d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e7376673f7374796c653d666c61742d737175617265)](https://opensource.org/licenses/MIT)[![Laravel](https://camo.githubusercontent.com/81615c353d20ccf5c519e480cf8f27245c8cd0397e7d150e5029427481826f8f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322532422d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://laravel.com)[![PHP](https://camo.githubusercontent.com/6caa15003495643be73f70c6033009042189b7d38acf492a3d5fd04ffbb45059/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://php.net)[![Livewire](https://camo.githubusercontent.com/d6d07ea00f7ac0be12c811a7ab61ae26e4002b2ab2d3d89b764c0a24f5eb6af5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c697665776972652d332e782d4642373041393f7374796c653d666c61742d737175617265266c6f676f3d6c69766577697265266c6f676f436f6c6f723d7768697465)](https://livewire.laravel.com)

**Build scalable, maintainable Laravel applications with self-contained HMVC modules.**

**One command. Complete module. Zero configuration.**

[Quick Start](#-quick-start) • [Features](#-features) • [Commands](#-all-commands) • [Examples](#-real-world-examples) • [Support](#-support)

---

🎯 What Is This?
---------------

[](#-what-is-this)

Laravel Module Maker is a powerful package that generates **complete, production-ready modules** for your Laravel applications using the HMVC (Hierarchical Model-View-Controller) pattern.

### The Problem

[](#the-problem)

```
Traditional Laravel App          Your App After Module Maker
─────────────────────           ──────────────────────────────
app/                            modules/
├── Controllers/                ├── Product/
│   ├── UserController              ├── Controllers/
│   ├── ProductController           ├── Models/
│   ├── OrderController             ├── Views/
│   └── ... (100+ files)            ├── Routes/
├── Models/                         ├── Tests/
│   └── ... (50+ files)             └── ... (self-contained)
└── ... (messy!)                ├── Order/
                                │   └── ... (self-contained)
❌ Hard to maintain             └── User/
❌ Tight coupling                   └── ... (self-contained)
❌ Difficult to scale
                                ✅ Easy to maintain
                                ✅ Loose coupling
                                ✅ Scales effortlessly
```

### The Solution

[](#the-solution)

```
php artisan make:module Product --type=full
```

**You get:** A complete, self-contained module with API, UI, database, tests, and more. **In 2 seconds.**

---

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

[](#-features)

🚀 Module Types🔧 Automation📦 Management🎨 UI/UXFull-StackAuto-register providersList modulesTailwind CSSAPI-onlyAuto-update composerDelete safelyAlpine.jsLivewire-onlyAuto-add navigationHealth checksResponsiveWith relationshipsAuto-register routesDashboardReal-time validation

### 🪄 Magical Features

[](#-magical-features)

- **🧭 Auto Navigation**: Adds links to your layout automatically
- **🏥 Health Monitoring**: 10-point health check system
- **📊 Dashboard**: Beautiful overview of all modules
- **🔗 Relationships**: Scaffold BelongsTo and HasMany relationships
- **⚡ Zero Config**: Everything works out of the box
- **🛡️ Safe Deletion**: Double confirmation + automatic cleanup

---

📋 Requirements
--------------

[](#-requirements)

```
PHP      >= 8.2
Laravel  >= 12.0
Composer >= 2.0
Livewire >= 3.0  (optional, for Livewire modules)
```

---

🚀 Installation
--------------

[](#-installation)

```
composer require phpsamurai/laravel-module-maker
```

**Optional:** For Livewire modules:

```
composer require livewire/livewire
```

**That's it!** Ready to use. No configuration needed.

---

⚡ Quick Start
-------------

[](#-quick-start)

### Create Your First Module

[](#create-your-first-module)

```
php artisan make:module Blog --type=full
```

### Run Migrations

[](#run-migrations)

```
php artisan migrate
```

### Access Your Module

[](#access-your-module)

- 🌐 **Web UI**: `http://your-app.test/blogs`
- 🔌 **API**: `http://your-app.test/api/blogs`

### See the Magic

[](#see-the-magic)

```
php artisan module:dashboard
```

**Done!** Your module is ready with UI, API, database, tests, and navigation. 🎉

---

🎯 Module Types
--------------

[](#-module-types)

TypeCommandWhat You GetUse Case**🌟 Full-Stack**
*Recommended*```
--type=full
```

• API Controller
• Livewire Components
• Models &amp; DB
• Both Web &amp; API
• 18 files

Complete features needing both UI and API

**🔌 API**```
--type=api
```

• API Controller
• Models &amp; DB
• Bootstrap Views
• API Resources
• 15 files

Backend services, REST APIs, microservices

**⚡ Livewire**```
--type=livewire
```

• Livewire Components
• Tailwind Views
• Web Routes
• No Backend
• 8 files

UI for existing APIs, frontend features

---

📚 All Commands
--------------

[](#-all-commands)

### 🎨 Module Creation

[](#-module-creation)

```
# Interactive mode (prompts for type)
php artisan make:module Product

# Full-Stack module (API + Livewire)
php artisan make:module Product --type=full

# API module (backend only)
php artisan make:module Product --type=api

# Livewire module (UI only)
php artisan make:module Product --type=livewire

# With relationships
php artisan make:module-with-relations OrderItem \
  --type=full \
  --belongs-to=Order \
  --belongs-to=Product \
  --has-many=Review

# With options
php artisan make:module Product --force --no-tests --no-seeders
```

### 📊 Module Management

[](#-module-management)

```
# Interactive dashboard
php artisan module:dashboard

# List all modules
php artisan list:modules

# Check module health
php artisan module:health Product

# Check all modules health
php artisan module:health

# Delete module (with confirmation)
php artisan delete:module Product

# Force delete (no confirmation)
php artisan delete:module Product --force
```

### ⚙️ Customization

[](#️-customization)

```
# Publish configuration
php artisan vendor:publish --tag=module-maker-config

# Publish stub templates
php artisan vendor:publish --tag=module-maker-stubs
```

---

🏗️ What Gets Generated
----------------------

[](#️-what-gets-generated)

### Full-Stack Module Structure

[](#full-stack-module-structure)

```
modules/Product/
│
├── 📁 Controllers/
│   └── ProductApiController.php       # RESTful API with search, filter, pagination
│
├── 📁 Livewire/
│   ├── Index.php                      # List with real-time search & delete
│   ├── Create.php                     # Create form with validation
│   └── Edit.php                       # Edit form with validation
│
├── 📁 Models/
│   └── Product.php                    # Eloquent model with scopes
│
├── 📁 Views/
│   └── livewire/
│       ├── index.blade.php            # Tailwind styled list view
│       ├── create.blade.php           # Tailwind styled form
│       └── edit.blade.php             # Tailwind styled form
│
├── 📁 Routes/
│   ├── web.php                        # Livewire routes (/products)
│   └── api.php                        # API routes (/api/products)
│
├── 📁 Http/
│   ├── Resources/
│   │   ├── ProductResource.php        # JSON resource transformer
│   │   └── ProductCollection.php      # JSON collection wrapper
│   ├── Middleware/                    # Ready for custom middleware
│   └── Requests/                      # Ready for form requests
│
├── 📁 Database/
│   ├── Migrations/
│   │   └── 2025_xx_xx_create_product_table.php
│   ├── Seeders/
│   │   └── ProductSeeder.php          # Sample data seeder
│   └── Factories/
│       └── ProductFactory.php         # Factory for testing
│
├── 📁 Tests/
│   ├── Feature/
│   │   └── ProductTest.php            # HTTP endpoint tests
│   └── Unit/
│       └── ProductTest.php            # Model unit tests
│
├── 📁 Providers/
│   └── ProductServiceProvider.php     # Auto-registered provider
│
└── 📁 Config/                         # Module-specific config

```

**Total: 18 files, ~35 KB, Production-ready**

---

🔥 Automatic Features
--------------------

[](#-automatic-features)

### What Happens Automatically

[](#what-happens-automatically)

When you run `php artisan make:module Product --type=full`:

**✅ File Generation**

- 18 files created
- All properly namespaced
- PSR-4 compliant
- Modern PHP 8.2+ syntax

**✅ Registration**

- Service provider registered
- Routes registered (web &amp; API)
- Livewire components registered
- View namespaces registered

**✅ Configuration**

- Composer autoload updated
- `composer dump-autoload` runs
- All caches cleared
- Migrations loaded

**✅ UI Enhancement**

- Navigation link added
- Layout created (if needed)
- Views registered
- Components ready

### What You Need to Do

[](#what-you-need-to-do)

```
php artisan migrate
```

**That's it!** Everything else is automatic. 🎉

---

💻 Code Examples
---------------

[](#-code-examples)

### Generated API Controller

[](#generated-api-controller)

```
namespace Modules\Product\Controllers;

class ProductApiController
{
    public function index(Request $request): JsonResponse
    {
        $query = Product::query();

        // 🔍 Built-in search
        if ($request->has('search')) {
            $query->where('name', 'like', "%{$request->search}%");
        }

        // 🎯 Built-in filtering
        if ($request->has('is_active')) {
            $query->where('is_active', $request->is_active);
        }

        // 📄 Built-in pagination
        $products = $query->paginate(15);

        return response()->json(new ProductCollection($products));
    }

    // ✅ store(), show(), update(), destroy() included
}
```

### Generated Livewire Component

[](#generated-livewire-component)

```
namespace Modules\Product\Livewire;

use Livewire\Component;
use Livewire\WithPagination;

class Index extends Component
{
    use WithPagination;

    public $search = '';
    public $confirmingDeletion = false;

    // 🔍 Real-time search
    protected $queryString = ['search'];

    // 🗑️ Delete with confirmation
    public function delete($id)
    {
        $this->confirmingDeletion = true;
        $this->deletingId = $id;
    }

    public function render()
    {
        $products = Product::query()
            ->when($this->search, fn($q) =>
                $q->where('name', 'like', "%{$this->search}%")
            )
            ->latest()
            ->paginate(15);

        return view('products::livewire.index', [
            'products' => $products
        ]);
    }
}
```

### Generated Routes

[](#generated-routes)

```
// Web Routes (Livewire UI)
Route::get('/products', Index::class)->name('products.index');
Route::get('/products/create', Create::class)->name('products.create');
Route::get('/products/{product}/edit', Edit::class)->name('products.edit');

// API Routes (JSON)
Route::prefix('products')->group(function () {
    Route::get('/', [ProductApiController::class, 'index']);
    Route::post('/', [ProductApiController::class, 'store']);
    Route::get('/{product}', [ProductApiController::class, 'show']);
    Route::put('/{product}', [ProductApiController::class, 'update']);
    Route::delete('/{product}', [ProductApiController::class, 'destroy']);
});
```

---

🌟 Advanced Features
-------------------

[](#-advanced-features)

### 1. 🧭 Automatic Navigation

[](#1--automatic-navigation)

**Navigation links are added automatically!**

```
php artisan make:module Product --type=full
```

**Before:**

```

  Home
  Orders

```

**After:**

```

  Home
  Orders
  Products  ← Added automatically!

```

**Features:**

- ✅ Auto-adds for Livewire/Full-Stack modules
- ✅ Auto-removes when module deleted
- ✅ No duplicates
- ✅ Maintains formatting

---

### 2. 📊 Interactive Dashboard

[](#2--interactive-dashboard)

**See everything at a glance!**

```
php artisan module:dashboard
```

**Output:**

```
╔══════════════════════════════════════════════════════════════╗
║           🏗️  LARAVEL MODULE MAKER DASHBOARD 🏗️             ║
╚══════════════════════════════════════════════════════════════╝

📊 MODULE STATISTICS

  Total Modules:        5
  Full-Stack Modules:   3
  API Modules:          2
  Livewire Modules:     0
  Total Routes:         45
  Total Files:          85
  Total Size:           250.5 KB

📦 YOUR MODULES

┌──────────┬────────────┬────────┬─────────┐
│ Module   │ Type       │ Routes │ Health  │
├──────────┼────────────┼────────┼─────────┤
│ Category │ Full-Stack │ 9      │ ✅ 100% │
│ Order    │ Full-Stack │ 9      │ ✅ 100% │
│ Product  │ Full-Stack │ 9      │ ✅ 100% │
│ Tag      │ API        │5       │ ✅ 100% │
│ UserUI   │ Livewire   │ 3      │ ✅ 100% │
└──────────┴────────────┴────────┴─────────┘

⚡ QUICK ACTIONS
  • Create:  php artisan make:module {name} --type=full
  • Health:  php artisan module:health {name}
  • Delete:  php artisan delete:module {name}

```

---

### 3. 🏥 Health Check System

[](#3--health-check-system)

**Monitor your modules' health!**

```
# Check single module
php artisan module:health Product

# Check all modules
php artisan module:health
```

**10-Point Health Check:**

1. ✅ Has controllers/components
2. ✅ Has models
3. ✅ Has routes
4. ✅ Has views
5. ✅ Has migrations
6. ✅ Has tests
7. ✅ Has service provider
8. ✅ Provider registered
9. ✅ Routes registered
10. ✅ Namespace configured

**Health Scores:**

- 🟢 **90-100%**: Excellent
- 🟡 **70-89%**: Needs attention
- 🔴 **Below 70%**: Critical

---

### 4. 🔗 Relationship Scaffolding

[](#4--relationship-scaffolding)

**Generate modules with relationships built-in!**

```
php artisan make:module-with-relations OrderItem \
  --type=full \
  --belongs-to=Order \
  --belongs-to=Product \
  --has-many=Review
```

**Automatically generates:**

**In Model:**

```
public function order()
{
    return $this->belongsTo(\Modules\Order\Models\Order::class);
}

public function product()
{
    return $this->belongsTo(\Modules\Product\Models\Product::class);
}

public function reviews()
{
    return $this->hasMany(\Modules\Review\Models\Review::class);
}
```

**In Migration:**

```
$table->foreignId('order_id')->constrained()->onDelete('cascade');
$table->foreignId('product_id')->constrained()->onDelete('cascade');
```

---

🌈 Real-World Examples
---------------------

[](#-real-world-examples)

### Example 1: E-commerce Platform

[](#example-1-e-commerce-platform)

```
# Step 1: Create product catalog
php artisan make:module Product --type=full
php artisan migrate

# Step 2: Create orders with relationships
php artisan make:module-with-relations Order \
  --type=full \
  --has-many=OrderItem

# Step 3: Create order items with relationships
php artisan make:module-with-relations OrderItem \
  --type=full \
  --belongs-to=Order \
  --belongs-to=Product

# Step 4: View dashboard
php artisan module:dashboard

# Done! You have:
# ✅ Product catalog with UI and API
# ✅ Order management with relationships
# ✅ Order items linked to orders and products
# ✅ All navigation links added automatically
```

### Example 2: Blog Platform

[](#example-2-blog-platform)

```
# Backend API
php artisan make:module Post --type=api
php artisan make:module Comment --type=api

# Frontend UIs
php artisan make:module BlogPublic --type=livewire
php artisan make:module BlogAdmin --type=livewire

# Result: Separate backend and multiple frontends!
```

### Example 3: SaaS Application

[](#example-3-saas-application)

```
# Core modules
php artisan make:module User --type=full
php artisan make:module Subscription --type=full
php artisan make:module Payment --type=full

# Feature modules
php artisan make:module Analytics --type=api
php artisan make:module Reporting --type=api

# UI modules
php artisan make:module Dashboard --type=livewire
php artisan make:module Settings --type=livewire

# Check everything
php artisan module:dashboard
```

---

🔌 API Endpoints
---------------

[](#-api-endpoints)

### Generated Endpoints

[](#generated-endpoints)

MethodEndpointFeatures`GET``/api/products`List, search, filter, paginate, sort`POST``/api/products`Create with validation`GET``/api/products/{id}`Show single resource`PUT``/api/products/{id}`Update with validation`DELETE``/api/products/{id}`Delete resource### Example API Usage

[](#example-api-usage)

```
# List products
curl http://your-app.test/api/products

# Search
curl "http://your-app.test/api/products?search=laptop"

# Filter
curl "http://your-app.test/api/products?is_active=1"

# Paginate
curl "http://your-app.test/api/products?page=2"

# Create
curl -X POST http://your-app.test/api/products \
  -H "Content-Type: application/json" \
  -d '{"name":"Laptop","description":"Gaming laptop"}'

# Update
curl -X PUT http://your-app.test/api/products/1 \
  -H "Content-Type: application/json" \
  -d '{"name":"Updated Laptop"}'

# Delete
curl -X DELETE http://your-app.test/api/products/1
```

**Response Format:**

```
{
  "data": [
    {
      "id": 1,
      "name": "Product Name",
      "description": "Description",
      "is_active": true,
      "created_at": "2025-10-09T12:00:00.000000Z"
    }
  ],
  "meta": {
    "total": 100,
    "per_page": 15,
    "current_page": 1
  }
}
```

---

🎨 Livewire Components
---------------------

[](#-livewire-components)

### Interactive UI Components

[](#interactive-ui-components)

**Index Component:**

- 🔍 Real-time search
- 📄 Pagination
- 🗑️ Delete with confirmation modal
- ✅ Success/error messages
- 📱 Responsive design

**Create Component:**

- 📝 Form with validation
- ⚡ Real-time validation
- 🎯 Wire:model binding
- ✅ Success redirect

**Edit Component:**

- 📝 Pre-filled form
- ⚡ Real-time validation
- 💾 Update functionality
- ✅ Success redirect

### Example Livewire View

[](#example-livewire-view)

```

        @foreach($products as $product)

                {{ $product->name }}
                {{ $product->description }}

                    Delete

        @endforeach

    {{ $products->links() }}

```

---

🧪 Testing
---------

[](#-testing)

### Generated Tests

[](#generated-tests)

**Feature Test:**

```
public function test_product_can_be_created(): void
{
    $response = $this->post(route('api.products.store'), [
        'name' => 'Test Product',
        'description' => 'Test description',
    ]);

    $response->assertStatus(201);
    $this->assertDatabaseHas('products', [
        'name' => 'Test Product'
    ]);
}
```

**Unit Test:**

```
public function test_product_active_scope(): void
{
    Product::factory()->create(['is_active' => true]);
    Product::factory()->create(['is_active' => false]);

    $this->assertCount(1, Product::active()->get());
}
```

**Livewire Test:**

```
public function test_can_create_product_via_livewire(): void
{
    Livewire::test(Create::class)
        ->set('name', 'New Product')
        ->call('save')
        ->assertRedirect(route('products.index'));
}
```

### Run Tests

[](#run-tests)

```
# All tests
php artisan test

# Specific module
php artisan test modules/Product/Tests/

# With coverage
php artisan test --coverage
```

---

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

[](#️-configuration)

### Publish Config

[](#publish-config)

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

### Available Options

[](#available-options)

```
return [
    // Module directory
    'path' => 'modules',

    // Namespace prefix
    'namespace' => 'Modules',

    // Default module type
    'default_type' => 'api',

    // Auto-register routes
    'auto_register_routes' => true,

    // Route types to register
    'route_registration' => 'both', // 'web', 'api', or 'both'

    // Generation options
    'generate_tests' => true,
    'generate_seeders' => true,
    'generate_factories' => true,
];
```

### Customize Stubs

[](#customize-stubs)

```
php artisan vendor:publish --tag=module-maker-stubs
```

Stubs copied to `resources/stubs/module-maker/`

**Available variables:**

VariableOutputUse`{{module}}``Product`Class names`{{moduleLower}}``product`Variables`{{moduleSnake}}``product`Tables`{{modulePlural}}``Products`Labels`{{namespace}}``Modules`Namespaces`{{moduleNamespace}}``Modules\Product`Full namespace---

🚨 Troubleshooting
-----------------

[](#-troubleshooting)

**❓ Class Not Found**```
composer dump-autoload
php artisan optimize:clear
```

Verify `bootstrap/providers.php` contains your service provider.

**❓ Routes Not Working**```
php artisan route:clear
php artisan route:list --name=products
```

Check service provider is registered.

**❓ Livewire Component Not Found**```
composer require livewire/livewire
php artisan optimize:clear
```

Ensure `@livewireStyles` and `@livewireScripts` in layout.

**❓ Views Not Found**```
php artisan view:clear
```

Use namespace notation: `products::livewire.index`

**❓ Navigation Link Not Added**Check `resources/views/components/layouts/app.blade.php` exists. The package creates it automatically for first Livewire module.

---

📖 Best Practices
----------------

[](#-best-practices)

### ✅ DO

[](#-do)

- **Use PascalCase** for module names: `ProductCatalog`, `UserManagement`
- **Plan relationships** before creating modules
- **Run health checks** before deployment
- **Use dashboard** to monitor modules
- **Test modules** after generation
- **Backup** before deleting modules
- **Use Full-Stack** for complete features

### ❌ DON'T

[](#-dont)

- **Use snake\_case** for module names
- **Skip migrations** after creating modules
- **Delete without confirmation** in production
- **Ignore health warnings**
- **Create without planning structure**
- **Use --force** without backups

---

🎯 Use Cases
-----------

[](#-use-cases)

### 🏢 Enterprise

[](#-enterprise)

- User Management
- Role &amp; Permissions
- Audit Logging
- Reporting
- Admin Dashboards
- Multi-tenancy

### 🛒 E-commerce

[](#-e-commerce)

- Product Catalog
- Shopping Cart
- Order Processing
- Payment Gateway
- Inventory
- Customer Portal

### 📱 SaaS

[](#-saas)

- Subscription Management
- Billing
- Analytics
- User Dashboards
- API Services
- Webhooks

### 📝 CMS

[](#-cms)

- Blog Posts
- Pages
- Media Library
- Comments
- Categories
- Tags

### 🎓 Education

[](#-education)

- Courses
- Lessons
- Quizzes
- Student Management
- Progress Tracking
- Certificates

### 🏥 Healthcare

[](#-healthcare)

- Patient Records
- Appointments
- Prescriptions
- Billing
- Reports
- Notifications

---

🚀 Performance
-------------

[](#-performance)

### Production Optimization

[](#production-optimization)

```
# Cache everything
php artisan route:cache
php artisan config:cache
php artisan view:cache

# Optimize autoloader
composer install --optimize-autoloader --no-dev
```

### Module Performance

[](#module-performance)

- ⚡ **Fast Generation**: 1-3 seconds per module
- ⚡ **Lazy Loading**: Resources loaded only when needed
- ⚡ **Efficient Autoloading**: PSR-4 compliant
- ⚡ **Zero Runtime Overhead**: Only used during generation
- ⚡ **Optimized Queries**: Includes pagination and filtering

---

📊 Command Reference
-------------------

[](#-command-reference)

### Complete Command List

[](#complete-command-list)

CommandDescriptionExample`make:module`Create module`php artisan make:module Product --type=full``make:module-with-relations`Create with relationships`php artisan make:module-with-relations OrderItem --belongs-to=Order``list:modules`List all modules`php artisan list:modules``module:dashboard`Show dashboard`php artisan module:dashboard``module:health`Check health`php artisan module:health Product``delete:module`Delete module`php artisan delete:module Product`### Command Options

[](#command-options)

OptionAvailable OnDescription`--type={full|api|livewire}`make:moduleModule type`--belongs-to={Model}`make:module-with-relationsBelongsTo relationship`--has-many={Model}`make:module-with-relationsHasMany relationship`--force`make:module, delete:moduleSkip confirmations`--no-tests`make:moduleSkip test generation`--no-seeders`make:moduleSkip seeder generation`--no-factories`make:moduleSkip factory generation---

🎓 Learning Path
---------------

[](#-learning-path)

### Beginner

[](#beginner)

1. **Install** the package
2. **Create** your first module: `php artisan make:module Blog --type=full`
3. **Run** migrations: `php artisan migrate`
4. **Visit** in browser: `/blogs`
5. **Explore** the generated files

### Intermediate

[](#intermediate)

1. **Create** multiple modules
2. **Use** relationships: `make:module-with-relations`
3. **Customize** stubs
4. **Monitor** with dashboard
5. **Run** health checks

### Advanced

[](#advanced)

1. **Publish** configuration
2. **Customize** all stubs
3. **Create** custom module types
4. **Integrate** with CI/CD
5. **Build** complex architectures

---

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

[](#-contributing)

We welcome contributions!

1. Fork the repository
2. Create feature branch: `git checkout -b feature/amazing`
3. Commit changes: `git commit -m 'Add amazing feature'`
4. Push branch: `git push origin feature/amazing`
5. Open Pull Request

### Development

[](#development)

```
git clone https://github.com/phpsamurai/laravel-module-maker.git
cd laravel-module-maker
composer install
```

---

📄 License
---------

[](#-license)

MIT License - see [LICENSE](LICENSE) file for details.

---

💬 Support
---------

[](#-support)

**Need Help?**

[📧 Email](mailto:dev.sief.hesham@gmail.com) • [🐛 Issues](https://github.com/phpsamurai/laravel-module-maker/issues) • [📚 Wiki](https://github.com/0x3b3fc/laravel-module-maker/wiki)

---

📈 Changelog
-----------

[](#-changelog)

### Version 1.0.2 (October 2025)

[](#version-102-october-2025)

**🎉 Initial Release**

**Core Features:**

- ✅ Three module types (Full-Stack, API, Livewire)
- ✅ Interactive CLI with type selection
- ✅ 27 customizable stub templates
- ✅ Complete HMVC structure generation

**Automation:**

- ✅ Auto-register service providers
- ✅ Auto-update composer autoload
- ✅ Auto-register routes (web &amp; API)
- ✅ Auto-register Livewire components
- ✅ Auto-add navigation links
- ✅ Auto-create Livewire layout

**Module Management:**

- ✅ List modules with statistics
- ✅ Interactive dashboard
- ✅ Health check system (10-point)
- ✅ Safe module deletion
- ✅ Automatic cleanup

**Advanced Features:**

- ✅ Relationship scaffolding
- ✅ BelongsTo and HasMany support
- ✅ Foreign key generation
- ✅ Navigation management
- ✅ Health monitoring

**Developer Experience:**

- ✅ Beautiful CLI output
- ✅ Helpful tips and suggestions
- ✅ Comprehensive error messages
- ✅ Progress indicators
- ✅ Double confirmations for safety

---

🗺️ Roadmap
----------

[](#️-roadmap)

### Coming Soon

[](#coming-soon)

- 🔄 Module update command
- 📦 Module export/import
- 🔗 Module dependency graph
- 🌐 Multi-language support
- 🎨 More UI frameworks (Bootstrap, Vuetify)
- 🧩 Plugin system
- 📊 Advanced analytics
- 🔐 Permission scaffolding
- 🚀 Performance dashboard
- 📱 Mobile-first templates

---

⭐ Show Your Support
-------------------

[](#-show-your-support)

If this package helps you build better Laravel applications:

**⭐ Star on GitHub** **💬 Leave Feedback**

---

**Laravel Module Maker** - Your magic wand for building modular Laravel applications.

*Transform monolithic apps into modular masterpieces with a single command.*

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance69

Regular maintenance activity

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~1 days

Total

3

Last Release

212d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f22a01a2535b7524837de32d6037d2fb7040cc0ac0419b39ea23bcecab7786d1?d=identicon)[0x3b3fc](/maintainers/0x3b3fc)

---

Top Contributors

[![siefhesham-boca](https://avatars.githubusercontent.com/u/234080835?v=4)](https://github.com/siefhesham-boca "siefhesham-boca (3 commits)")[![0x3b3fc](https://avatars.githubusercontent.com/u/65143991?v=4)](https://github.com/0x3b3fc "0x3b3fc (1 commits)")

---

Tags

laravelgeneratorartisanlivewirehmvcmodularmodule-maker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phpsamurai-laravel-module-maker/health.svg)

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

###  Alternatives

[artem-schander/l5-modular

Modular pattern generator for Laravel

223235.5k](/packages/artem-schander-l5-modular)[tyghaykal/laravel-seed-generator

Laravel Seed Generator

8037.0k1](/packages/tyghaykal-laravel-seed-generator)

PHPackages © 2026

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