PHPackages                             mozex/laravel-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. [Database &amp; ORM](/categories/database)
4. /
5. mozex/laravel-modules

ActiveLibrary[Database &amp; ORM](/categories/database)

mozex/laravel-modules
=====================

Laravel package that auto-discovers and registers module assets (configs, routes, views, migrations, commands, Livewire, Filament, Nova, and more) from a Modules/ directory at the project root.

3.3.0(2mo ago)718.1k↑54.2%1[2 PRs](https://github.com/mozex/laravel-modules/pulls)MITPHPPHP ^8.3.0CI passing

Since Oct 15Pushed 3w ago1 watchersCompare

[ Source](https://github.com/mozex/laravel-modules)[ Packagist](https://packagist.org/packages/mozex/laravel-modules)[ Docs](https://github.com/mozex/laravel-modules)[ GitHub Sponsors](https://github.com/mozex)[ RSS](/packages/mozex-laravel-modules/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (45)Versions (49)Used By (0)

Laravel Modules
===============

[](#laravel-modules)

[![Latest Version on Packagist](https://camo.githubusercontent.com/60ce30a63ba0ed02537c3315699ba72889f9c578f0a2ea0abfa6182c504cae05/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f7a65782f6c61726176656c2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mozex/laravel-modules)[![GitHub Checks Workflow Status](https://camo.githubusercontent.com/921bb7462e03b7700922ff99772c262b0ee5c5e4c9658f9da9c87cb9ee85b1c8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f7a65782f6c61726176656c2d6d6f64756c65732f636865636b732e796d6c3f6272616e63683d6d61696e266c6162656c3d636865636b73267374796c653d666c61742d737175617265)](https://github.com/mozex/laravel-modules/actions/workflows/checks.yml)[![Docs](https://camo.githubusercontent.com/6bae6cab4895bc9b3768db4e7f44e2640da7b03da9635f43f34a1ea306f23e0e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d6d6f7a65782e6465762d3130423938313f7374796c653d666c61742d737175617265)](https://mozex.dev/docs/laravel-modules/v3)[![License](https://camo.githubusercontent.com/44e66c990cca041113831b557de52d39b94718dba81e90b3ffdb813a5d0fded5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6f7a65782f6c61726176656c2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mozex/laravel-modules)[![Total Downloads](https://camo.githubusercontent.com/382296bb79ee03919bbc2847f37c7acfce3ba18c20c25ca7d5200995a4df47dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f7a65782f6c61726176656c2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mozex/laravel-modules)

A zero-config modular architecture package for Laravel. Create a `Modules/` directory, drop in your module folders, and the package auto-discovers and registers everything: configs, routes, views, Blade components, migrations, seeders, commands, service providers, helpers, translations, models, factories, policies, events, listeners, Livewire components, Filament resources, and Nova resources.

> **[Read the full documentation at mozex.dev](https://mozex.dev/docs/laravel-modules/v3)**: searchable docs, version requirements, detailed changelog, and more.

Table of Contents
-----------------

[](#table-of-contents)

- [Introduction](https://mozex.dev/docs/laravel-modules/v3)
- Features
    - [Blade Components](https://mozex.dev/docs/laravel-modules/v3/features/blade-components)
    - [Views](https://mozex.dev/docs/laravel-modules/v3/features/views)
    - [Routes](https://mozex.dev/docs/laravel-modules/v3/features/routes)
    - [Configs](https://mozex.dev/docs/laravel-modules/v3/features/configs)
    - [Migrations](https://mozex.dev/docs/laravel-modules/v3/features/migrations)
    - [Seeders](https://mozex.dev/docs/laravel-modules/v3/features/seeders)
    - [Commands](https://mozex.dev/docs/laravel-modules/v3/features/commands)
    - [Helpers](https://mozex.dev/docs/laravel-modules/v3/features/helpers)
    - [Models &amp; Factories](https://mozex.dev/docs/laravel-modules/v3/features/models-factories)
    - [Policies](https://mozex.dev/docs/laravel-modules/v3/features/policies)
    - [Events &amp; Listeners](https://mozex.dev/docs/laravel-modules/v3/features/events-listeners)
    - [Service Providers](https://mozex.dev/docs/laravel-modules/v3/features/service-providers)
    - [Translations](https://mozex.dev/docs/laravel-modules/v3/features/translations)
    - [Caching](https://mozex.dev/docs/laravel-modules/v3/features/caching)
    - [Listing Modules](https://mozex.dev/docs/laravel-modules/v3/features/listing)
    - [Livewire Components](https://mozex.dev/docs/laravel-modules/v3/features/livewire-components)
    - [Filament](https://mozex.dev/docs/laravel-modules/v3/features/filament)
    - [Nova Resources](https://mozex.dev/docs/laravel-modules/v3/features/nova-resources)
- Integrations
    - [PHPStan](https://mozex.dev/docs/laravel-modules/v3/integrations/phpstan)
    - [PHPUnit](https://mozex.dev/docs/laravel-modules/v3/integrations/phpunit)
    - [Pest](https://mozex.dev/docs/laravel-modules/v3/integrations/pest)
    - [Inertia](https://mozex.dev/docs/laravel-modules/v3/integrations/inertia)

Support This Project
--------------------

[](#support-this-project)

I maintain this package along with [several other open-source PHP packages](https://mozex.dev/docs) used by thousands of developers every day.

If my packages save you time or help your business, consider [**sponsoring my work on GitHub Sponsors**](https://github.com/sponsors/mozex). Your support lets me keep these packages updated, respond to issues quickly, and ship new features.

Business sponsors get logo placement in package READMEs. [**See sponsorship tiers →**](https://github.com/sponsors/mozex)

What You Get
------------

[](#what-you-get)

**Convention over configuration.** Module directory names become view namespaces, Blade component prefixes, and translation keys. `Modules/Blog/` gives you `view('blog::home')`, ``, and `__('blog::messages.welcome')` with no setup.

**Everything auto-discovered.** Routes load with the right middleware groups based on filename (`web.php` gets `web` middleware, `api.php` gets `api` prefix and middleware). Service providers register themselves. Commands appear in Artisan. Migrations run with `php artisan migrate`. Factories and policies resolve from models automatically.

**Full Livewire v4 support.** Class-based components, single-file components (SFC), and multi-file components (MFC) all work with namespaced aliases like ``.

**Filament v5 integration.** Resources, pages, widgets, and clusters register with panels based on directory structure. Put a resource in `Filament/Admin/Resources/` and it shows up in the `admin` panel.

**Fine-grained control when you need it.** Enable or disable individual modules, set load order, toggle specific features, and override discovery patterns. All from `config/modules.php`.

**Production-ready caching.** One command (`php artisan modules:cache`) caches all discovery results. No scanning on every request.

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

[](#installation)

> **Requires [PHP 8.3+](https://php.net/releases/)** - see [all version requirements](https://mozex.dev/docs/laravel-modules/v3/requirements)

```
composer require mozex/laravel-modules
```

Register the `Modules` namespace in your project's `composer.json`:

```
{
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Modules\\": "Modules/"
        }
    }
}
```

Regenerate the autoloader:

```
composer dump-autoload
```

Optionally publish the config to change defaults:

```
php artisan vendor:publish --tag=laravel-modules-config
```

Quick Start
-----------

[](#quick-start)

Create a module with a route and a view:

```
Modules/
└── Blog/
    ├── Routes/
    │   └── web.php
    └── Resources/
        └── views/
            └── index.blade.php

```

The route file works like any Laravel route file:

```
use Illuminate\Support\Facades\Route;

Route::get('/blog', fn () => view('blog::index'));
```

That's a working module. The route loads with the `web` middleware group (because the file is named `web.php`) and the view is accessible through the `blog::` namespace. Add more directories as you need them: `Models/`, `Livewire/`, `Filament/Admin/Resources/`, and so on. The package picks up each one based on the conventions documented in the feature guides.

For a complete module structure, configuration reference, facade API, and detailed feature documentation, visit the [documentation site](https://mozex.dev/docs/laravel-modules/v3).

Resources
---------

[](#resources)

Visit the [documentation site](https://mozex.dev/docs/laravel-modules/v3) for searchable docs auto-updated from this repository.

- **[AI Integration](https://mozex.dev/docs/laravel-modules/v3/ai-integration)**: Use this package with AI coding assistants via Context7 and Laravel Boost
- **[Requirements](https://mozex.dev/docs/laravel-modules/v3/requirements)**: PHP, Laravel, and dependency versions
- **[Changelog](https://mozex.dev/docs/laravel-modules/v3/changelog)**: Release history with linked pull requests and diffs
- **[Contributing](https://mozex.dev/docs/laravel-modules/v3/contributing)**: Development setup, code quality, and PR guidelines
- **[Questions &amp; Issues](https://mozex.dev/docs/laravel-modules/v3/questions-and-issues)**: Bug reports, feature requests, and help
- **[Security](mailto:hello@mozex.dev)**: Report vulnerabilities directly via email

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance91

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 91.8% 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 ~21 days

Recently: every ~11 days

Total

45

Last Release

37d ago

Major Versions

2.8.1 → 3.0.12026-02-26

2.8.2 → 3.0.22026-03-08

2.9.0 → 3.0.42026-03-30

2.10.0 → 3.1.02026-03-31

2.11.0 → 3.3.02026-04-22

PHP version history (5 changes)1.0.0PHP ^8.1

2.6.0PHP ^8.1.0

2.8.0PHP ^8.2.0

3.0.0PHP ^8.3.0

2.x-devPHP ^8.3

### Community

Maintainers

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

---

Top Contributors

[![mozex](https://avatars.githubusercontent.com/u/18025667?v=4)](https://github.com/mozex "mozex (334 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (17 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

auto-discoveryddddomain-driven-designfilamenthmvclaravellivewiremodular-architecturemodulesphplaravelpackageeloquentlaravel-packagelivewiremodulemodulesDomain Driven Designdddhmvcmodularfilamentmodular-architecturelaravel-modulesmozexauto-discoveryseparation-of-concernspackage-structure

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[relaticle/custom-fields

User Defined Custom Fields for Laravel Filament

16354.2k](/packages/relaticle-custom-fields)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11223.5M33](/packages/anourvalar-eloquent-serialize)[mhmiton/laravel-modules-livewire

Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.

236476.9k9](/packages/mhmiton-laravel-modules-livewire)[mozex/laravel-scout-bulk-actions

Import, flush, and queue-import all your Laravel Scout searchable models at once. Auto-discovers models, runs in bulk, tracks progress.

1539.3k](/packages/mozex-laravel-scout-bulk-actions)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)[mominalzaraa/filament-localization

The first and only automatic Filament localization package with intelligent resource scanning, structured translation files, and comprehensive testing

102.8k](/packages/mominalzaraa-filament-localization)

PHPackages © 2026

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