nwidart/laravel-modules to provide a Filament-specific modular architecture, aligning with Laravel’s modular design patterns. This is ideal for large-scale applications requiring logical separation of concerns (e.g., feature teams, plugins, or domain-driven design).ModulesPlugin acts as a meta-plugin, dynamically loading all module plugins without manual registration.nwidart/laravel-modules (v11/12), reducing setup complexity. However, manual configuration (e.g., composer.json merge-plugin) is required for autoloading.CanAccessTrait) suggests future-proofing for RBAC.composer.json (e.g., missing merge-plugin) can break module discovery. Requires careful setup.ModulesPlugin) adds runtime overhead for module discovery. Benchmarking may be needed for large module counts.| Scenario | Approach |
|---|---|
| Greenfield Project | 1. Install Laravel 11/12 + Filament 4.x. 2. Add coolsam/modules. 3. Run php artisan modules:install. 4. Generate modules/clusters via Artisan. |
| Existing Monolithic Filament | 1. Refactor incrementally: Migrate one resource/page at a time into a module. 2. Use module:filament:install to scaffold clusters. 3. Update navigation to use clusters. 4. Deprecate global Filament files. |
| Legacy Filament 3.x | Downgrade to filament-modules:4.x and Laravel 10, but lose Filament 4.x/5.x features. |
| Hybrid Monolithic + Modular | Use config/filament-modules.php to set mode: BOTH for gradual adoption. |
ModulesPlugin) may conflict.composer.json merge-plugin for module autoloading.coolsam/modules and publish config.ModulesPlugin in AdminPanelProvider.php artisan module:make.php artisan module:filament:install.php artisan module:filament:resource.clusters.enabled and panels.group in filament-modules.php.Filament\Resources\Resource with Coolsam\Modules\Resource for protected routes (WIP).php artisan module:test).InventoryModule without touching UsersModule).PaymentsModule").module:filament:resource).filament-modules.php settings must be consistent across environments.composer dump-autoload and merge-plugin are configured.ModulesPlugin is registered in AdminPanelProvider.clusters.enabled = true and UX preferences (e.g., use-top-navigation).Modules/*/composer.json in merge-plugin.panels.group config)..env or config.ModulesPlugin loads all modules on panel initialization. For **>5How can I help you explore Laravel packages today?