PHPackages                             cesargb/laravel-modules - 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. cesargb/laravel-modules

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

cesargb/laravel-modules
=======================

Organize your Laravel application into independent local modules using Composer path repositories

0.1.5(2mo ago)06MITPHPPHP ^8.4CI passing

Since Feb 12Pushed 2mo agoCompare

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

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

[![Laravel Modules](art/laravel-modules.webp)](art/laravel-modules.webp)

[![tests](https://github.com/cesargb/laravel-modules/actions/workflows/tests.yml/badge.svg)](https://github.com/cesargb/laravel-modules/actions/workflows/tests.yml)[![static analysis](https://github.com/cesargb/laravel-modules/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/cesargb/laravel-modules/actions/workflows/static-analysis.yml)[![lint](https://github.com/cesargb/laravel-modules/actions/workflows/lint.yml/badge.svg)](https://github.com/cesargb/laravel-modules/actions/workflows/lint.yml)

Laravel Modules
===============

[](#laravel-modules)

A local module management system for Laravel using Composer. Organize your application into independent modules installed and uninstalled as Composer `path` packages.

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

[](#installation)

```
composer require --dev cesargb/laravel-modules
```

Then configure the modules directory:

```
php artisan modules:config
```

Commands
--------

[](#commands)

### `modules:create`

[](#modulescreate)

Create a new local module:

```
php artisan modules:create my-vendor/my-module
```

### `modules:download`

[](#modulesdownload)

Download a module from a Git repository:

```
php artisan modules:download https://github.com/vendor/module.git
php artisan modules:download https://github.com/vendor/module.git --branch=main
php artisan modules:download https://github.com/vendor/module.git --tag=v1.0.0
php artisan modules:download https://github.com/vendor/module.git --name=my-module
```

### `modules:list`

[](#moduleslist)

List all modules with their installation status:

```
php artisan modules:list
```

### `modules:install`

[](#modulesinstall)

Install one or more modules:

```
php artisan modules:install my-module
php artisan modules:install module1 module2
```

### `modules:uninstall`

[](#modulesuninstall)

Uninstall one or more modules:

```
php artisan modules:uninstall my-module
php artisan modules:uninstall module1 module2
```

### `modules:remove`

[](#modulesremove)

Uninstall and permanently delete a module directory:

```
php artisan modules:remove my-module
php artisan modules:remove my-module --force
```

### `modules:test`

[](#modulestest)

Run PHPUnit tests for all local modules:

```
php artisan modules:test
php artisan modules:test --testdox
php artisan modules:test --filter=UserTest
```

Make Commands
-------------

[](#make-commands)

Generate files inside a module using `module:make:*` commands:

```
php artisan module:make:model my-module Post
php artisan module:make:controller my-module PostController
php artisan module:make:request my-module StorePostRequest
php artisan module:make:resource my-module PostResource
php artisan module:make:event my-module PostCreated
php artisan module:make:listener my-module SendNotification
php artisan module:make:job my-module ProcessPayment
php artisan module:make:mail my-module WelcomeEmail
php artisan module:make:notification my-module InvoicePaid
php artisan module:make:policy my-module PostPolicy
php artisan module:make:rule my-module Uppercase
php artisan module:make:enum my-module UserStatus
php artisan module:make:cast my-module Json
php artisan module:make:command my-module SendEmailCommand
php artisan module:make:class my-module Services/PaymentService
php artisan module:make:trait my-module Concerns/HasUuid
php artisan module:make:interface my-module Contracts/PaymentGateway
php artisan module:make:provider my-module PaymentServiceProvider
php artisan module:make:test my-module UserTest
php artisan module:make:view my-module dashboard
php artisan module:make:component my-module Alert
php artisan module:make:exception my-module PaymentFailedException
php artisan module:make:scope my-module ActiveScope
php artisan module:make:channel my-module SmsChannel
php artisan module:make:middleware my-module CheckRole
php artisan module:make:observer my-module UserObserver
php artisan module:make:config my-module payment
```

Programmatic Usage
------------------

[](#programmatic-usage)

```
use Cesargb\Modules\Modules;

Modules::all();            // all modules
Modules::installed();      // installed modules
Modules::uninstalled();    // uninstalled modules
Modules::get('my-module'); // specific module
Modules::isInstalled('my-module');
Modules::install('my-module');
Modules::uninstall('my-module');
```

```
$module = Modules::get('my-module');

$module->name;        // my-module
$module->packageName; // my-vendor/my-module
$module->version;     // ^1.0.0
$module->namespace;   // MyVendor\MyModule\
$module->installed;   // true/false

$module->install();
$module->uninstall();
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance84

Actively maintained with recent releases

Popularity5

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 ~2 days

Total

6

Last Release

81d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25681494?v=4)[Cesar Garcia](/maintainers/cesargb)[@cesargb](https://github.com/cesargb)

---

Top Contributors

[![cesargb](https://avatars.githubusercontent.com/u/25681494?v=4)](https://github.com/cesargb "cesargb (47 commits)")

---

Tags

laravel-packagemodular-architecturelaravel-packagemodular-architecture

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

### Embed Badge

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

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

###  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

20917.2M158](/packages/orchestra-canvas)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7012.8k](/packages/tehwave-laravel-achievements)

PHPackages © 2026

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