Search by

pharaonic / laravel-modulator

Pharaonic

Laravel-native modules for Laravel: convention-based discovery, nested submodules, package-provided modules with local overrides, and production-safe autoloading without per-module composer.json files.

Package info

github.com/Pharaonic/laravel-modulator

Documentation

pkg:composer/pharaonic/laravel-modulator

Fund package maintenance!

MoamenEltouny

Buy Me A Coffee

Statistics

Installs: 1 343

Dependents: 0

Suggesters: 0

Stars: 8

Open Issues: 0

13.0.1 2026-11-23 16:46 UTC

README

PHP Version : 8.3 | 8.4 | 8.5 Laravel Version : 13.x License Build
Source Packagist Version Packagist Downloads AI Ready: Laravel Boost

Laravel-native modules: discovered by convention, nested, overridable from packages, and autoloaded in every Composer mode.


Installation

composer require pharaonic/laravel-modulator

The service provider is registered automatically. Publish the configuration when you need to change it:

php artisan vendor:publish --tag=modulator-config

Usage

A directory with app/ under Modules/ is a module. No composer.json or manifest is needed:

php artisan module:make Shop
php artisan module:make:model Shop Product --migration
// Modules/Shop/app/Models/Product.php
namespace Modules\Shop\Models;

use Illuminate\Database\Eloquent\Model;

final class Product extends Model {}

// Anywhere in the application
Modules\Shop\Models\Product::query()->get();
Pharaonic\Laravel\Modulator\Facades\Modules::find('Shop')->isEnabled();

On deployment, after composer install, run php artisan module:cache.

Documentation

Full documentation: Laravel Modulator Documentation.

Support & Security

See SUPPORT.md and SECURITY.md. Contributions are welcome; see CONTRIBUTING.md.

License

MIT. See LICENSE.