PHPackages                             rayan-tools/l5-modular - 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. rayan-tools/l5-modular

ActiveLibrary[Framework](/categories/framework)

rayan-tools/l5-modular
======================

Modular pattern generator for Laravel 5

1.3.4(9y ago)6162MITPHPPHP &gt;=5.4.0

Since Apr 22Pushed 9y ago2 watchersCompare

[ Source](https://github.com/RayanTools/L5Modular)[ Packagist](https://packagist.org/packages/rayan-tools/l5-modular)[ Docs](https://github.com/Artem-Schander/L5Modular)[ RSS](/packages/rayan-tools-l5-modular/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

L5Modular
=========

[](#l5modular)

[![Laravel](https://camo.githubusercontent.com/b2b6acea0535d68fdfc62130a1cf57933b977f79a159ddb1bd2521f4809740b9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d352d6f72616e67652e737667)](http://laravel.com)[![Release](https://camo.githubusercontent.com/27e2b6c016214d94b0537d0a85a52b802aa92732f63db5282ae97c4a9f111881/68747470733a2f2f706f7365722e707567782e6f72672f726179616e2d746f6f6c732f6c352d6d6f64756c61722f762f737461626c65)](https://github.com/RayanTools/L5Modular/releases)[![Source](https://camo.githubusercontent.com/f62dc334af24a27779b4ead61f1749dd9477d44f525853edfb8021562cea894d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d526179616e546f6f6c732d6f72616e67652e737667)](https://github.com/RayanTools/L5Modular)[!\[Contributor\](https://img.shields.io/badge/contributor-Farhan Wazir-blue.svg)](https://github.com/farhanwazir)[![License](https://camo.githubusercontent.com/707e5029e0566d807a6cbc848faca4a73d162019f0423531fe8f9834da47babb/68747470733a2f2f706f7365722e707567782e6f72672f617274656d2d736368616e6465722f6c352d6d6f64756c61722f6c6963656e7365)](https://packagist.org/packages/rayan-tools/l5-modular)

This package gives you the ability to use Laravel 5 with module system. You can simply drop or generate modules with their own controllers, models, views, translations and a routes file into the `app/Modules` folder and go on working with them.

Thanks to zyhn for the ["Modular Structure in Laravel 5" tutorial](http://ziyahanalbeniz.blogspot.com.tr/2015/03/modular-structure-in-laravel-5.html). Well explained and helped a lot.

Documentation
-------------

[](#documentation)

- [Installation](#installation)
- [Getting started](#getting-started)
- [Usage](#usage)

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

[](#installation)

The best way to install this package is through your terminal via Composer.

Add the following line to the `composer.json` file and fire `composer update`

```
"RayanTools/l5-modular": "dev-master"

```

Once this operation is complete, simply add the service provider to your project's `config/app.php`

#### Service Provider

[](#service-provider)

```
RayanTools\L5Modular\ModuleServiceProvider::class,

```

Getting started
---------------

[](#getting-started)

The built in Artisan command `php artisan make:module name [--no-migration] [--no-translation]` generates a ready to use module in the `app/Modules` folder and a migration if necessary.

Since version 1.3.0 you can generate modules named with more than one word, like `foo-bar`.

This is how the generated module would look like:

```
laravel-project/
    app/
    |-- Modules/
        |-- FooBar/
            |-- Controllers/
                |-- FooBarController.php
            |-- Models/
                |-- FooBar.php
            |-- Views/
                |-- index.blade.php
            |-- Translations/
                |-- en/
                    |-- example.php
            |-- routes.php
            |-- helper.php

```

Usage
-----

[](#usage)

The generated `RESTful Resource Controller` and the corresponding `routes.php` make it easy to dive in. In my example you would see the output from the `Modules/FooBar/Views/index.blade.php` when you open `laravel-project:8000/foo-bar` in your browser.

#### Disable modules

[](#disable-modules)

In case you want to disable one ore more modules, you can add a `modules.php` into your projects `app/config` folder. This file should return an array with the module names that should be **loaded**. F.a:

```
return [
    'enable' => array(
        "customer",
        "contract",
        "reporting",
    ),
];

```

In this case L5Modular would only load this three modules `customer` `contract` `reporting`. Every other module in the `app/Modules` folder would not be loaded.

L5Modular will load all modules if there is no modules.php file in the config folder.

#### Change template

[](#change-template)

In case you want to change template, you can edit a `view.php` into your projects `app/config` folder and add key `template` with value template name.

```
return [
    'template' => 'default'
];

```

default template generated would look like:

```
laravel-project/
    resources/
        themes/
        |-- default/
            |-- Module1/
                |-- index.blade.php
            |-- Module2/
                |-- index.blade.php
            |-- Module3/
                |-- index.blade.php                

```

#### Update to 1.3.0

[](#update-to-130)

Since version 1.3.0 you have to follow the `upper camel case` name convention for the module folder. If you had a `Modules/foo` folder you have to rename it to `Modules/Foo`.

Also there are changes in the `app/config/modules.php` file. Now you have to return an array with the key `enable` instead of `list`.

License
-------

[](#license)

L5Modular is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT)(See LICENSE file for details).

---

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 75.9% 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 ~65 days

Recently: every ~85 days

Total

10

Last Release

3452d ago

### Community

Maintainers

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

---

Top Contributors

[![artem-schander](https://avatars.githubusercontent.com/u/1243826?v=4)](https://github.com/artem-schander "artem-schander (63 commits)")[![ahmadhossiny](https://avatars.githubusercontent.com/u/4056921?v=4)](https://github.com/ahmadhossiny "ahmadhossiny (10 commits)")[![farhanwazir](https://avatars.githubusercontent.com/u/241825?v=4)](https://github.com/farhanwazir "farhanwazir (9 commits)")[![tombombadilll](https://avatars.githubusercontent.com/u/1056064?v=4)](https://github.com/tombombadilll "tombombadilll (1 commits)")

---

Tags

laravelgeneratorartisanmodulemodulesstructurepatternmodularArtemSchanderl5modular

### Embed Badge

![Health badge](/badges/rayan-tools-l5-modular/health.svg)

```
[![Health](https://phpackages.com/badges/rayan-tools-l5-modular/health.svg)](https://phpackages.com/packages/rayan-tools-l5-modular)
```

###  Alternatives

[artem-schander/l5-modular

Modular pattern generator for Laravel

223235.5k](/packages/artem-schander-l5-modular)[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)[pingpong/modules

Laravel Modules

592188.7k13](/packages/pingpong-modules)

PHPackages © 2026

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