Laravel Modular v1.2.0 is a major strengthening release focused on production confidence, native Laravel developer experience, Laravel Boost support, richer diagnostics, and easier migration from nwidart/laravel-modules.
This release keeps the package philosophy clear: write normal Laravel code, organize it into modules, and use strong tooling around the module boundary.
laravel-modular-development skill.modular:status, modular:graph, and modular:why.modular:doctor --json for CI and machine-readable health checks.modular:doctor --fix for safe infrastructure repairs and stale cache refreshes.modular:debug --json for structured module inspection.modular:install --dry-run to preview installation changes safely.modular:refresh to clear and rebuild module discovery in one command.modular:import-nwidart with dry-run support for migration evaluation.module.json.conflicts and provides support to module metadata.Laravel Modular now ships first-class Laravel Boost resources:
resources/boost/guidelines/core.blade.php
resources/boost/skills/laravel-modular-development/SKILL.md
Boost-aware agents can now understand Laravel Modular conventions, prefer native Laravel make:* --module commands, respect module boundaries, validate manifests, and run the correct diagnostics.
New commands make modular applications easier to inspect and operate:
php artisan modular:status
php artisan modular:graph
php artisan modular:why Blog
php artisan modular:doctor --json
php artisan modular:debug Blog --json
These commands help teams understand module health, dependency relationships, providers, middleware, resources, validation errors, and why a module exists in the application.
modular:doctor --fix can now perform safe repairs, including creating missing module infrastructure and refreshing stale discovery cache when needed.
php artisan modular:doctor --fix
A new importer helps teams evaluate and migrate existing nwidart/laravel-modules style module directories:
php artisan modular:import-nwidart --dry-run
php artisan modular:import-nwidart Blog --from=NwidartModules
module.json now supports additional production-oriented metadata:
{
"conflicts": [],
"provides": []
}
These fields are included in validation, diagnostics, schema support, and dependency checks.
Laravel Modular now dispatches lifecycle events for integrations and automation:
ModuleEnablingModuleEnabledModuleDisablingModuleDisabledModularCachedModularRefreshedModule-aware model and factory generation has been improved so native Laravel flags stay inside module-native paths.
Example:
php artisan make:model Post --module=Blog -mcf
This now keeps generated models, migrations, controllers, and factories aligned with the module structure.
Misconfigured custom activators now fail with explicit runtime errors when the class is missing or does not implement the expected activator contract.
Malformed dependency declarations now surface through validation and dependency checks instead of causing unclear command failures.
The README and documentation have been expanded and repositioned for production adoption, including:
nwidart/laravel-modulescomposer update alizharb/laravel-modular
php artisan modular:refresh
php artisan modular:doctor
php artisan modular:check
php artisan test
For production deployments, prefer:
php artisan modular:cache
php artisan modular:doctor --json
v1.2.0 makes Laravel Modular feel more mature, inspectable, and production-ready. It strengthens the package beyond simple module generation by adding diagnostics, migration tooling, Boost support, lifecycle hooks, richer metadata, and documentation that helps teams evaluate the package seriously.
Laravel Modular now has a clearer identity:
Native Laravel development, organized into modules, backed by production-grade tooling.
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?