PHPackages                             devapps/laravel-modules-kit - 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. [Templating &amp; Views](/categories/templating)
4. /
5. devapps/laravel-modules-kit

ActiveLibrary[Templating &amp; Views](/categories/templating)

devapps/laravel-modules-kit
===========================

Laravel module generator and runtime loader for API, Blade, or hybrid modules.

1.1.2(3w ago)126↓57.5%MITPHPPHP ^8.1

Since Jun 3Pushed 3w agoCompare

[ Source](https://github.com/devappsteam/laravel-modules-kit)[ Packagist](https://packagist.org/packages/devapps/laravel-modules-kit)[ RSS](/packages/devapps-laravel-modules-kit/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (12)Versions (6)Used By (0)

Laravel Modules Kit
===================

[](#laravel-modules-kit)

Reusable Laravel package for generating and loading application modules with API, Blade, or hybrid scaffolding.

Features
--------

[](#features)

- Generates modules with `make:module`
- Supports `api` (default), `blade`, and `hybrid` module types
- Supports **submodules** — organize modules hierarchically (e.g. `ERP/Companies`)
- Automatically loads module providers, routes, migrations, views, and config files
- Publishes package config and stubs for local customization
- Compatible with Laravel 10, 11 and 12

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10.x, 11.x or 12.x

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

[](#installation)

Install the package via Composer:

```
composer require devapps/laravel-modules-kit
```

Or specify a version:

```
composer require devapps/laravel-modules-kit:^1.0
```

After installation, publish the configuration file if you want to customize the package:

```
php artisan vendor:publish --tag=laravel-modules-kit-config
```

Optionally, publish the stubs:

```
php artisan vendor:publish --tag=laravel-modules-kit-stubs
```

Commands
--------

[](#commands)

### Basic usage

[](#basic-usage)

The default type is **`api`** — no flag needed:

```
php artisan make:module Billing
```

### Choosing the module type

[](#choosing-the-module-type)

Use one of the available flags to select a different type:

```
php artisan make:module Billing           # api (default)
php artisan make:module Billing --api     # api (explicit)
php artisan make:module Catalog --blade   # blade
php artisan make:module Orders --hybrid   # api + blade
```

### Submodules

[](#submodules)

Organize modules hierarchically by separating segments with `/`:

```
php artisan make:module ERP/Companies
php artisan make:module ERP/HR/Employees --blade
php artisan make:module Finance/Invoices  --hybrid
```

This generates the module under `app/Modules/ERP/Companies/` with the PHP namespace `App\Modules\ERP\Companies`.

### Force overwrite

[](#force-overwrite)

```
php artisan make:module Billing --force
```

Generated structure
-------------------

[](#generated-structure)

The package generates modules under `app/Modules/` by default (supports subpaths).

```
app/Modules/
└── ERP/
    └── Companies/
        ├── Config/
        │   └── module.php
        ├── Database/
        │   ├── Factories/
        │   ├── Migrations/
        │   └── Seeders/
        ├── Http/
        │   ├── Controllers/
        │   ├── Requests/
        │   └── Resources/       # api and hybrid only
        ├── Models/
        ├── Policies/
        ├── Providers/
        ├── Repositories/
        │   └── Contracts/
        ├── Resources/
        │   └── views/           # blade and hybrid only
        │       └── partials/
        ├── Routes/
        │   ├── api.php          # api and hybrid
        │   └── web.php          # blade and hybrid
        └── Services/

```

Each generated file includes:

- **Model** — with UUID trait, SoftDeletes, and fillable stub
- **Repository** — interface + implementation
- **Service** — thin service layer wrapping the repository
- **Form Requests** — `Store` and `Update` requests
- **Policy** — registered automatically via the ServiceProvider
- **Controller** — tailored to the selected type (api / blade / hybrid)
- **Resource** — JSON resource (api and hybrid)
- **Views** — index, create, edit, show, partials/form (blade and hybrid)
- **Factory &amp; Seeder**
- **Migration**
- **ServiceProvider** — binds repository interface and registers the policy

Runtime loading
---------------

[](#runtime-loading)

When installed in a Laravel application, the package scans the configured modules directory (recursively) and automatically:

- registers each module's ServiceProvider
- loads module routes from `Routes/web.php` and `Routes/api.php`
- loads module migrations from `Database/Migrations`
- loads module views from `Resources/views`
- loads module config files from `Config`

Config highlights
-----------------

[](#config-highlights)

The package config lets you customize:

- base modules path (`app/Modules` by default)
- module namespace (`App\Modules` by default)
- API prefix and middleware
- web middleware
- runtime loading toggles
- published stubs path
- default module type (`api` by default)

Notes
-----

[](#notes)

- The default module type is `api` — omitting the flag always produces an API module
- Submodule paths accept `/` or `\` as separators
- The default API prefix is `api/v1`
- Blade view overrides are read from `resources/views/modules/`
- The default module namespace is `App\Modules`

Blade views
-----------

[](#blade-views)

For **blade** and **hybrid** modules, views are automatically registered with a namespace based on the module path.

### Examples

[](#examples)

Module:

```
app/Modules/Billing

```

View:

```
app/Modules/Billing/Resources/views/index.blade.php

```

Usage:

```
return view('billing::index');
```

Module:

```
app/Modules/ERP/Customer

```

View:

```
app/Modules/ERP/Customer/Resources/views/index.blade.php

```

Usage:

```
return view('erp-customer::index');
```

Views inside subdirectories use dot notation:

```
app/Modules/ERP/Customer/Resources/views/customers/create.blade.php

```

Usage:

```
return view('erp-customer::customers.create');
```

### View overrides

[](#view-overrides)

Module views can be overridden by placing Blade files in:

```
resources/views/modules/

```

For example, the following file overrides the `index` view of the `Customer` module:

```
resources/views/modules/Customer/index.blade.php

```

When an override exists, Laravel will automatically load it instead of the module's original view.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance95

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

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

Every ~7 days

Total

5

Last Release

24d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/def0f779b769531b0393894fac4efcba12fc92deb11b28b235bea62cbbc55454?d=identicon)[devappsteam](/maintainers/devappsteam)

---

Top Contributors

[![devappsteam](https://avatars.githubusercontent.com/u/89113684?v=4)](https://github.com/devappsteam "devappsteam (9 commits)")

---

Tags

apilaravelgeneratorblademodules

### Embed Badge

![Health badge](/badges/devapps-laravel-modules-kit/health.svg)

```
[![Health](https://phpackages.com/badges/devapps-laravel-modules-kit/health.svg)](https://phpackages.com/packages/devapps-laravel-modules-kit)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

728176.2k14](/packages/tallstackui-tallstackui)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[illuminate/queue

The Illuminate Queue package.

20432.6M1.7k](/packages/illuminate-queue)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k30.2M151](/packages/laravel-cashier)

PHPackages © 2026

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