This release introduces massive architectural upgrades to flawlessly align custom modular setups with native Laravel framework expectations, resolving deep historical friction points.
Blade::componentNamespace to enable auto-discovery. Class components in your module's app/View/Components/ directory now seamlessly render natively via <x-module::component>.Factory::guessFactoryNamesUsing() mapping behind the scenes. Native factory resolution is now supported for modular models (Product::factory()->create()) without pathing conflicts.route_prefix string to module.json. web.php and api.php module routes will now automatically and natively dynamically wrap under this nested prefix when registered.ModuleRegistry now guarantees modules boot in strict dependency order (via requires arrays) to entirely prevent race conditions and boot crashes.make:*) now natively parse a module's internal stubs/ directory first. This allows developers to completely isolate and override Laravel framework scaffolding natively on a strict per-module basis.laravel-modular/docs directory inserting comprehensive architectural diagrams, routing specifics, and component mappings directly into the developer site.This release represents a profound stabilization layer specifically addressing large-scale monorepo component isolation and strict dependency reliability.
This release focuses on hardening the modular architecture and streamlining the developer experience, particularly for large teams and high-performance applications.
New modules generated via php artisan make:module now automatically include .gitignore and .gitattributes. This encourages a "Module-as-a-Package" mindset, making it easier to manage modules as independent units or prepare them for extraction into standalone repositories.
The module:enable command is now "dependency-aware." It recursively verifies that any dependencies defined in a module's module.json are also enabled. This prevents runtime "Service Not Found" errors by ensuring the dependency tree is healthy during activation.
Module activation statuses are now part of the global modular cache. By running php artisan modular:cache, activation flags are moved from the filesystem into the bootstrap-level cache, significantly reducing I/O overhead during the application boot cycle.
modular:doctor)We've significantly upgraded the modular:doctor command to help you maintain a clean codebase. It now detects:
make:module: Automatic generation of .gitignore and .gitattributes.modular:doctor.modular:install now configures the root composer.json to run module suites in isolation.modular:test now sequentially executes tests in dedicated environments.pint.json and dev-dependencies across the ecosystem.Update your package via Composer:
composer update alizharb/laravel-modular
After updating, it is recommended to run the doctor to verify your environment:
php artisan modular:doctor
This release introduces critical safety features for module management and a complete visual overhaul of the documentation site.
module:uninstall {module} command. It safely removes modules and automatically handles cache clearing, ensuring a clean state.module.json:
removable: Protects core/system modules from accidental uninstallation via CLI (default: true).disableable: Prevents critical modules from being disabled (default: true).module:disable command now strictly respects the disableable metadata flag, preventing accidental shutdowns of vital services.removable and disableable fields by default.ModuleRegistry.package.json and vite.config.js for isolated dependency control.package.json to recognize modules, enabling efficient dependency hoisting.modular:npm Command: Manage module-level assets directly from Artisan (e.g., php artisan modular:npm Blog install).vite.modular.js now dynamically absorbs configuration from each module for a unified build process.modular:install command now automates high-performance class loading for the Modules\ namespace.modular:sync Command: Easily flatten module-specific dependencies into the root composer.json for production optimization.modular:list Command: Visualize all registered modules and discovered resources (Policies, Events) along with their registration source.ModuleRegistry now tracks whether resources were found via convention or explicit configuration.Full Changelog: https://github.com/AlizHarb/laravel-modular/compare/v1.1.1...v1.1.2
This release refines the installation process for greater control and significantly improves how Vite discovers assets in modular applications.
vite.modular.js for clean, standalone asset discovery in modules/. The new modularLoader helper simplifies vite.config.js configuration.modular:install command now respects your existing setup, prompting for confirmation before modifying composer.json or vite.config.js.app) in the Service Provider stub for new modules.phpunit.xml and phpstan.neon for more reliable local package verification.ModularInstallCommandTest to verify installation workflows programmatically.composer.json to help developers find official modular extensions.This upgrade transforms Laravel Modular into a high-performance, production-ready framework with zero-overhead discovery and advanced dependency safeguards.
modular:cache). In production, this eliminates all resource-related filesystem hits.merge-plugin configuration to use static naming and zero recursion, delivering a 90%+ reduction in Composer overhead for large modular projects.modular:check command automatically detects circular dependencies and validates Semver version constraints (e.g., Blog:^1.1) between modules.ModuleRegistry and traits for flawless autocomplete in PHPStorm/VSCode.modular:debug: Instant snapshot of any module's configuration, providers, and middleware.modular:ide-helper: Generates ide helper metadata specifically for modular facades.components for better CLI output.Blog::key and blog::key).Upgrade Guide:
^1.1php artisan modular:install to sync optimized Composer settings.composer dump-autoloadphp artisan modular:cache to enable performance optimizations.We are excited to announce the first official release of Laravel Modular! This package provides a professional, framework-agnostic modular system engineered for Laravel 11 and 12, allowing you to build scalable and decoupled applications with ease.
Override 29+ native Artisan commands (including make:model, make:controller, make:migration, etc.) to support the --module flag natively. Every command feels exactly like standard Laravel, but perfectly organized within your modules.
Seamless integration with wikimedia/composer-merge-plugin. Your module-specific composer.json files are automatically discovered and merged, allowing for absolute decoupling and isolated dependency management.
The entire codebase is strictly typed (declare(strict_types=1)) and includes comprehensive PHPDocs for maximum stability and a premium developer experience in IDEs like PHPStorm and VSCode.
php artisan modular:link.module(), module_path(), and module_asset().composer require alizharb/laravel-modular
php artisan modular:install
php artisan make:module Blog
How can I help you explore Laravel packages today?