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

ActiveLaravel

xcms/modules
============

Laravel Module Manager

v1.1.2(8y ago)032MITPHPPHP &gt;=5.6.4

Since May 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/x-cms/modules)[ Packagist](https://packagist.org/packages/xcms/modules)[ RSS](/packages/xcms-modules/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (14)Used By (0)

Introduction
============

[](#introduction)

When you work on small project, you will feel laravel default structure is enough. When your project grows up, you will think to divide your app into module where each module will contain all of it resources such as Controllers, Models, Views, Migrations, Config etc. This `laravel-module-manager`package will help you to manage laravel modular application easily.

### Installation

[](#installation)

`composer require mrabbani/laravel-module-manager`

Add the module manager service provider to `config/app.php` file

`Mrabbani\ModuleManager\Providers\ModuleProvider::class,`

To create new module run the bellow command:

```
php artisan module:create name-of-your-module
php artisan module:install {module_alias_name}

```

If your module name is `module1` the module structure will be

[![Module Structure](https://camo.githubusercontent.com/3dcf9a8a9c0a8cbff688fb8fab2bb018287c90c38b306b2fbb8c888b9b140166/68747470733a2f2f6d72616262616e692e6769746875622e696f2f7075626c69632f696d616765732f6d6f64756c655f7374727563747572652e706e67 "Module Structure")](https://camo.githubusercontent.com/3dcf9a8a9c0a8cbff688fb8fab2bb018287c90c38b306b2fbb8c888b9b140166/68747470733a2f2f6d72616262616e692e6769746875622e696f2f7075626c69632f696d616765732f6d6f64756c655f7374727563747572652e706e67)

### Configuration

[](#configuration)

By default, all of your module will be placed inside `modules` directory into your application's base directory. If you want to change publish `module_manager` config file by

`php artisan vendor:publish`

Now you can change the default *modules* directory by changing `module_directory` value of `config/module_manager.php` file.

### Available commands

[](#available-commands)

To see all module related commands run `php artisan` into terminal. Available commands are:

- `php artisan module:create {alias}`
- `php artisan module:make:controller {alias} {ControllerName}`
- `php artisan module:make:controller {alias} {ControllerName} --resource`
- `php artisan module:make:command {alias} {CommandName}`
- `php artisan module:make:facade {alias} {FacadeName}`
- `php artisan module:make:middleware {alias} {MiddlewareName}`
- `php artisan module:make:migration {alias} {migration_name} --create --table=table_name`
- `php artisan module:make:migration {alias} {migration_name} --table=table_name`
- `php artisan module:make:model {alias} {ModelName}`
- `php artisan module:make:model {alias} {ModelName} --migration`
- `php artisan module:make:provider {alias} {ProviderName}`
- `php artisan module:make:request {alias} {RequestName}`
- `php artisan module:make:service {alias} {ServiceClassName}`
- `php artisan module:make:support {alias} {SupportClassName}`
- `php artisan module:migrate {alias}`
- `php artisan module:migrate:rollback {alias}`
- `php artisan module:routes`
- `php artisan module:install {alias}`
- `php artisan module:uninstall {alias}`
- `php artisan module:enable {alias}`
- `php artisan module:disable {alias}`

> 'alias' is your module's alias name. you can find module's alias name in `module.json` file of module directory

You must install your module to activate

`php artisan module:install {alias}`

### Loading Component

[](#loading-component)

You have to load views, config and translation by following [laravel package](https://laravel.com/docs/5.3/packages#resources)

##### Loading view

[](#loading-view)

```
view(module_alias::view_file)

```

you may load the **module1** module's `index.blade.php` view like so:

```
view('module1::index');

```

##### Loading translation

[](#loading-translation)

you may load the **module1** module's `welcome` line from the `messages` file like so:

```
trans('module1::messages.welcome');

```

##### Loading config file

[](#loading-config-file)

you may load the **module1** module's `welcome` line from the `messages` file like so:

`config('messages.welcome');`

You have to merge the configurations, use the `mergeConfigFrom` method within your `ModuleServiceProvider` provider's `register` method:

```
public function register()
{
    $this->mergeConfigFrom(
        __DIR__.'/../../config/messages.php', 'messages'
    );
}

```

> **You should register all of your module's custom provider in *ModuleServiceProvider* provider's *register* method instead application's *config/app.php* file.**

#### Credit

[](#credit)

[WebEd](https://github.com/sgsoft-studio/webed)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

13

Last Release

3277d ago

### Community

Maintainers

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

---

Top Contributors

[![jinhongjie007](https://avatars.githubusercontent.com/u/10215848?v=4)](https://github.com/jinhongjie007 "jinhongjie007 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M528](/packages/laravel-passport)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)

PHPackages © 2026

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