PHPackages                             norbybaru/modularize - 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. [Framework](/categories/framework)
4. /
5. norbybaru/modularize

ActiveLibrary[Framework](/categories/framework)

norbybaru/modularize
====================

Modularize Laravel application using a modular pattern

v2.0.0(1mo ago)0295[3 PRs](https://github.com/norbybaru/modularize/pulls)MITPHPPHP ^8.2CI passing

Since May 7Pushed 3w ago1 watchersCompare

[ Source](https://github.com/norbybaru/modularize)[ Packagist](https://packagist.org/packages/norbybaru/modularize)[ Docs](https://github.com/norbybaru/modularize)[ RSS](/packages/norbybaru-modularize/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (8)Versions (14)Used By (0)

Modularize
==========

[](#modularize)

**Modularize** helps you organize large Laravel applications into self-contained modules — each with its own controllers, models, migrations, routes, and service providers.

Instead of scattering related code across `app/Http/Controllers`, `app/Models`, and `database/migrations`, you group everything by feature: `modules/Auth/`, `modules/Billing/`, `modules/Notifications/`. Each module is independently navigable, testable, and replaceable — without changing how Laravel loads your application.

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

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, or 12

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

[](#installation)

```
composer require norbybaru/modularize
```

Configuration
-------------

[](#configuration)

Publish the package configuration:

```
php artisan vendor:publish --provider="NorbyBaru\Modularize\ModularizeServiceProvider"
```

### Autoloading

[](#autoloading)

Add the `Modules` namespace to your `composer.json` and run `composer dump-autoload`:

```
{
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Modules\\": "modules/"
        }
    }
}
```

### Config options

[](#config-options)

The published config file (`config/modularize.php`) exposes the following options:

OptionDefaultDescription`enable``true`Autoload all modules found in `root_path``root_path``modules`Root directory where modules are created`autoload_routes``true`Automatically register routes from each module's `Routes/` directory`autoload_service_provider``true`Automatically register each module's `Providers/ServiceProvider.php`When `enable` is `true`, modules are automatically discovered and booted — no manual registration required.

Creating Your First Module
--------------------------

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

Generate a model with all related files in one command:

```
php artisan module:make:model User --module=Auth --all
```

This creates the following structure:

```
modules/
└── Auth/
    ├── Controllers/
    │   └── UserController.php
    ├── Database/
    │   ├── Factories/
    │   │   └── UserFactory.php
    │   ├── Migrations/
    │   │   └── _create_users_table.php
    │   └── Seeders/
    │       └── UserSeeder.php
    ├── Models/
    │   └── User.php
    └── Policies/
        └── UserPolicy.php

```

Command Reference
-----------------

[](#command-reference)

### Module Management

[](#module-management)

CommandDescription`module:list`List all existing modules### Generators

[](#generators)

All generator commands accept `--module=` to specify the target module and `--force` to overwrite an existing file. If `--module` is omitted, you will be prompted interactively with autocomplete.

CommandKey OptionsDescription`module:make:model``-a/--all`, `-m/--migration`, `-f/--factory`, `-s/--seed`, `-c/--controller`, `--policy`, `--api`, `-r/--resource`, `-i/--invokable`, `-p/--pivot`Generate a model; `--all` also creates a migration, factory, seeder, policy, and resource controller`module:make:controller``--api`, `-r/--resource`, `-i/--invokable`, `-m/--model=`Generate a controller (`--api` omits `create` and `edit` methods)`module:make:migration``--create=`, `--table=`Generate a migration`module:make:factory``--model=`Generate a model factory`module:make:seeder`—Generate a seeder`module:make:policy``--model=`Generate a policy`module:make:request`—Generate a form request`module:make:resource`—Generate an API resource`module:make:middleware`—Generate middleware`module:make:event`—Generate an event`module:make:listener`—Generate a listener`module:make:job`—Generate a job`module:make:mail`—Generate a mailable`module:make:notification`—Generate a notification`module:make:provider`—Generate a service provider`module:make:component`—Generate a view component`module:make:console`—Generate an Artisan command`module:make:view`—Generate a Blade view`module:make:test`—Generate a test classContributing
------------

[](#contributing)

Contributions are welcome. Fork the repository, create a branch off `master`, and open a pull request.

License
-------

[](#license)

MIT — see [LICENSE.md](LICENSE.md).

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance93

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 85.7% 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 ~577 days

Recently: every ~720 days

Total

6

Last Release

41d ago

Major Versions

1.2.2 → v2.0.02026-04-03

PHP version history (3 changes)1.0.0PHP &gt;=5.6.0

1.1.0PHP &gt;=5.6.4

v2.0.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![norbybaru](https://avatars.githubusercontent.com/u/13020317?v=4)](https://github.com/norbybaru "norbybaru (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")

---

Tags

laravelmodularizemodulemodule-patternphplaravelmodulemodulesstructuremodularlaravel-modularmodularize

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/norbybaru-modularize/health.svg)

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

###  Alternatives

[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.4k10.6M274](/packages/laravel-boost)[internachi/modular

Modularize your Laravel apps

1.1k662.4k8](/packages/internachi-modular)[artem-schander/l5-modular

Modular pattern generator for Laravel

223235.5k](/packages/artem-schander-l5-modular)[laravel/ai

The official AI SDK for Laravel.

732506.3k60](/packages/laravel-ai)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[mhmiton/laravel-modules-livewire

Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.

236409.6k9](/packages/mhmiton-laravel-modules-livewire)

PHPackages © 2026

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