PHPackages                             hsameerc/laravel-modular-structure - 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. hsameerc/laravel-modular-structure

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

hsameerc/laravel-modular-structure
==================================

Modular Structure Generator for Laravel 5

11.4k[1 issues](https://github.com/hsameerc/LaravelModularStructure/issues)PHP

Since Jul 22Pushed 10y ago1 watchersCompare

[ Source](https://github.com/hsameerc/LaravelModularStructure)[ Packagist](https://packagist.org/packages/hsameerc/laravel-modular-structure)[ RSS](/packages/hsameerc-laravel-modular-structure/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Modular Structure
=========================

[](#laravel-modular-structure)

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`

```
"hsameerc/laravel-modular-structure": "dev-master"

```

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

#### Service Provider

[](#service-provider)

```
Hsameerc\LaravelModularStructure\ModuleServiceProvider::class,

```

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

[](#getting-started)

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

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
            |-- Requests/
                |-- FooBarRequest.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",
        "jobs",
        "reporting",
    ),
];

```

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

Laravel Modular Structure will load all modules if there is no modules.php file in the config folder.

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)

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

###  Health Score

18

—

LowBetter than 7% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6310818?v=4)[Sameer Humagain](/maintainers/hsameerc)[@hsameerc](https://github.com/hsameerc)

### Embed Badge

![Health badge](/badges/hsameerc-laravel-modular-structure/health.svg)

```
[![Health](https://phpackages.com/badges/hsameerc-laravel-modular-structure/health.svg)](https://phpackages.com/packages/hsameerc-laravel-modular-structure)
```

###  Alternatives

[adlino/locations

Iran Provinces, Counties and Cities with a Google Map Location for Laravel.

171.3k](/packages/adlino-locations)

PHPackages © 2026

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