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

ActiveLibrary[Framework](/categories/framework)

torann/modules
==============

Basic module implantation for Laravel

0.1.1(8y ago)01101PHPPHP &gt;=5.6

Since Jan 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Torann/modules)[ Packagist](https://packagist.org/packages/torann/modules)[ RSS](/packages/torann-modules/feed)WikiDiscussions master Synced 4d ago

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

Modules
=======

[](#modules)

[![Latest Stable Version](https://camo.githubusercontent.com/2fbeed60fb282848dad1ba91cfaa77fcd18b39cb1d8e3fdb92d7e46a900bf5e6/68747470733a2f2f706f7365722e707567782e6f72672f746f72616e6e2f6d6f64756c65732f762f737461626c652e706e67)](https://packagist.org/packages/torann/modules) [![Total Downloads](https://camo.githubusercontent.com/678b97b3ee05f643cc88fb212f210c29295ffc51c1fceca8ed99f4b0a6f32e17/68747470733a2f2f706f7365722e707567782e6f72672f746f72616e6e2f6d6f64756c65732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/torann/modules)

Basic module implantation for Laravel.

- [Modules on Packagist](https://packagist.org/packages/torann/modules)
- [Modules on GitHub](https://github.com/torann/modules)

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

[](#installation)

### Composer

[](#composer)

From the command line run:

```
$ composer require torann/modules

```

### The Service Provider

[](#the-service-provider)

Open up `config/app.php` and find the `providers` key.

```
'providers' => [

    \Torann\Modules\ModulesServiceProvider::class,

]
```

### Publish the configurations

[](#publish-the-configurations)

Run this on the command line from the root of your project:

```
artisan vendor:publish --provider="Torann\Modules\ModulesServiceProvider"
```

The configuration file is stored in `/config/modules.php` file and is documented inline. Please note this step is required, when adding a new module it updates this file with it's settings. Along with the configuration file, the sample stubs files are published to the `/resources/stubs/modules` directory. These are used to generate new modules.

### Integrating

[](#integrating)

To support database factories and seeders, along with routing you will need to do a few more things:

#### Routing

[](#routing)

In `/app/Providers/RouteServiceProvider.php` at the end of `map` function add

```
modules()->loadRoutes($this->app['router'], 'api');
modules()->loadRoutes($this->app['router'], 'web');
```

#### Database

[](#database)

##### Seeding

[](#seeding)

In your default seeder `/database/seeds/DatabaseSeeder` at this to the end of `run` method add:

```
modules()->seed($this);
```

##### Factories

[](#factories)

In `/database/factories/UserFactory.php` (or `/database/factories/ModelFactory.php`) add at the end of file:

```
modules()->loadFactories($factory);
```

Commands
--------

[](#commands)

### module:make

[](#modulemake)

This command creates new modules. You can create one module or multiple modules at once.

Example usage:

```
artisan module:make products orders
```

### module:files

[](#modulefiles)

Allow to create files in module that already exists.

Example usage:

```
artisan module:make products camera radio
```

### module:migration

[](#modulemigration)

Creates migration file in given module

Example usage:

```
artisan module:migration products create_products_table
```

You can also use optional `--type` and `--table` options to set table and type of migration in order to create migration with template for given type, for example:

```
artisan module:migration products create_camera_table --table=cameras --type=create
```

This will create migration that is of type `create` - so in `up` method there will be creating `cameras` table and in `down` method deleting `cameras` table

> If the application supports multi-tenancy, the `--tenant` option can be used to store migration file in the tenant subdirectory of the module migration directory.

### module:cache

[](#modulecache)

Create a module cache file for faster module registration.

Example usage:

```
artisan module:cache
```

### module:clear

[](#moduleclear)

Remove the module cache file.

Example usage:

```
artisan module:clear
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

3005d ago

### Community

Maintainers

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

---

Top Contributors

[![Torann](https://avatars.githubusercontent.com/u/1406755?v=4)](https://github.com/Torann "Torann (7 commits)")

---

Tags

laravelmodulesmodulesmodularlaravel-modules

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[internachi/modular

Modularize your Laravel apps

1.1k662.4k8](/packages/internachi-modular)[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)[artem-schander/l5-modular

Modular pattern generator for Laravel

223235.5k](/packages/artem-schander-l5-modular)[oleksandr-torosh/yona-cms

Yona CMS - open source content management system (CMS). Written in Phalcon PHP Framework (v 1.3.x). Has a convenient modular structure. Has simple configuration and architecture. Can be easily modified for any task with any loads.

3652.1k](/packages/oleksandr-torosh-yona-cms)

PHPackages © 2026

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