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

ActiveLibrary[Framework](/categories/framework)

azzazkhan/modular-laravel
=========================

Add modularization in your Laravel application

v1.0.6(1y ago)1324MITPHPPHP ^8.3

Since Apr 12Pushed 1y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (4)Versions (8)Used By (0)

Modular Laravel
===============

[](#modular-laravel)

This package is intended for adding modularization capability in your [Laravel 11](https://laravel.com/docs/11.x)applications. This package is inspired by the [Modular Laravel](https://laracasts.com/series/modular-laravel) series on Laracasts and provides helpful artisan commands for scaffolding modules and its components.

### Please note this package is created for personal use only and not intended to be used by public.

[](#please-note-this-package-is-created-for-personal-use-only-and-not-intended-to-be-used-by-public)

If you like this package and want to introduce custom modifications, please feel free to fork it and add relevant changes.

To install this package run the following command in your Laravel application.

```
composer require azzazkhan/modular-laravel
```

While installing this package composer will ask to allow `wikimedia/composer-merge-plugin` plugin. It should be allowed as it is needed for properly registering the components for each module. In addition to allowing the plugin, you also need to define the merge plugin's configuration in `extra` property of your `composer.json` file.

```
{
    "extra": {
        "laravel": {
            "dont-discover": []
        },
        "merge-plugin": {
            "include": [
                "modules/*/composer.json"
            ]
        }
    }
}
```

Next, you need to swap out the default routing definition in `bootstrap/app.php` with the following one. The specified `RouteService` will register your app's default `web`, `api` and health routes. It also exposes some methods for properly registering web and api routes for each of your application's modules. The event configuration is used to auto-discover Laravel 11's typed event listeners within all of your application modules.

```
use Azzazkhan\ModularLaravel\Services\RoutingService;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Support\Facades\App;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        using: fn () => App::call(RoutingService::class),
        commands: __DIR__ . '/../routes/console.php',
    )
    ->withMiddleware(function (Middleware $middleware) {
        //
    })
    ->withExceptions(function (Exceptions $exceptions) {
        //
    })->create();
```

Finally, update your `phpunit.xml` file and add the `testsuite`, `source/include` and `source/exclude` entries so PHPUnit scan your module directories while discovering tests.

```

            modules/*/tests/Feature
            modules/*/tests/Unit

            modules

            modules/*/database
            modules/*/resources
            modules/*/tests

```

Note that all `module:*` commands provided this package serves same purpose as their `make:*` counterparts, thought some modifications are made for easier scaffolding.

1. All commands supporting `--test` option will only generate an accompanying Pest test.
2. The controller, seeder, factory and observer commands will always append relevant Controller/Seeder/Factory/Observer/Request suffix to the class name if not provided while executing the command.
3. The controller generation command does not support resource related actions.
4. Event listeners are needed to be manually registered in module's service provider as Laravel doesn't support typed event listeners discovery outside `app` directory.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance45

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Recently: every ~82 days

Total

7

Last Release

422d ago

### Community

Maintainers

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

---

Top Contributors

[![azzazkhan](https://avatars.githubusercontent.com/u/25636920?v=4)](https://github.com/azzazkhan "azzazkhan (31 commits)")

---

Tags

laravelmodularizationphp

### Embed Badge

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

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

###  Alternatives

[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)[raugadh/fila-starter

Laravel Filament Starter.

614.9k](/packages/raugadh-fila-starter)

PHPackages © 2026

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