- How do I install coolsam/modules in a Laravel app with Filament?
- Run composer require coolsam/modules, publish the package config with the vendor:publish command so config/filament-modules.php exists, and add ModulesPlugin::make() to your panel in AdminPanelProvider. You also need nwidart/laravel-modules installed and configured, plus the merge-plugin autoload block for Modules/*/composer.json in your root composer.json. Then run module:filament:install <Module> for each module you want to expose to Filament. Plan for the setup to touch build tooling, not just application code.
- Which Laravel and Filament versions does coolsam/modules support?
- Version 5.x of the package supports Laravel 11, 12 and 13, Filament 4.x and 5.x, and nwidart/laravel-modules 11 or higher on PHP 8.2+. Filament 5 support is explicitly described as experimental, so validate it against your own panel before committing. If you are on Filament 3, use the 4.x branch of the package, and on Laravel 10 use the 3.x branch. Because the package sits at the intersection of three dependencies, any major bump in Laravel, Filament or nwidart gates an upgrade of the others.
- Do I need nwidart/laravel-modules before installing coolsam/modules?
- Yes. coolsam/modules is a thin adapter that wraps nwidart/laravel-modules so each module can expose itself as a first-class Filament plugin, cluster and set of resources, pages and widgets. It does not create module boundaries for you, so adopting it without an existing modular structure gives you little benefit. Start with nwidart alone if your codebase is still monolithic, then add this package once module boundaries are real.
- How do I register each module's Filament plugin in my admin panel?
- You register ModulesPlugin::make() once in your panel and the package discovers and registers the individual module plugins for you. Auto-registration is controlled by the auto-register-plugins option in config/filament-modules.php, so you can disable it and register plugins manually if you prefer explicit wiring. This removes the need to list every module plugin inside AdminPanelProvider, which is the main developer-experience win. The tradeoff is that a module that fails to register produces a low-signal failure that spans Filament, the package and nwidart.
- What is the merge-plugin composer.json requirement and will it break CI or Docker builds?
- The package relies on the merge-plugin autoload entry pointing at Modules/*/composer.json so each module's service providers and classes are autoloaded from the root install. That means composer install, composer dump-autoload and production builds with --no-dev all have to resolve module composer files correctly. Check this against your existing CI pipeline, Docker image builds and any composer caching you rely on before rolling it out. It is a build-tooling dependency, so treat it as an infrastructure change rather than a normal package install.
- Can coolsam/modules handle multiple panels or per-tenant panels without double-registering resources?
- The config exposes a mode setting (plugins, panels or both, with both as the default) plus clusters.* and panels.* options that control how modules surface in your Filament panels. The default topology can proliferate panels, so decide deliberately whether you want modules to appear only as plugins in a single admin panel. Test per-tenant or per-portal panel setups explicitly, because auto-registration across several panels is exactly where duplicate resource registration can appear. Verify the behaviour in a staging environment before standardizing on a mode.
- Is coolsam/modules production ready and actively maintained?
- It is MIT licensed, has a small codebase and roughly 210 GitHub stars with a single primary maintainer, so the bus factor is one and the fork path is realistic but inherits the same nwidart and Filament coupling. The widgets, themes and access-control layer (Resource, Page, TableWidget, CanAccessTrait) are marked work in progress, so do not build authorization around them. Treat the three-way version lockstep between Laravel, Filament and nwidart as the dominant long-term risk. Ask the maintainer about the support policy for Filament 5 GA and the historical lag between a Filament major release and a compatible release here.
- Why is my module not showing up in the Filament admin panel?
- The most common causes are a missing or stale merge-plugin autoload entry in composer.json, a cached config, or a module that was never prepared with module:filament:install. Run composer dump-autoload and clear the config cache, then confirm the generated module plugin class exists and is discoverable. Because registration is automatic, a silent failure requires understanding Filament, coolsam/modules and nwidart to diagnose, so enable manual registration temporarily to isolate the problem. Check that the module is enabled in nwidart's own configuration as well.
- Does coolsam/modules handle authorization and access control for module resources?
- Not reliably. The package's Resource, Page and TableWidget base classes and the CanAccessTrait are explicitly marked work in progress, so they should not be the foundation of your permission model. Keep standard Filament policies as the source of truth for who can view, create and update records inside modules. Document that convention for your team so nobody assumes the module layer enforces access rules.
- What are the alternatives to coolsam/modules for a modular Filament application?
- The closest alternative is using nwidart/laravel-modules on its own and registering each module's Filament plugin manually in your panel provider, which is more verbose but far easier to debug. You can also use Filament clusters and separate panels to carve out admin areas without any module package, or keep a single monolith with well-namespaced directories. If you want the package's behavior without the dependency, the plugin registration loop is small enough that inlining it and dropping the package is a viable exit strategy. Evaluate the exit cost before adopting, because a fork still inherits the nwidart and Filament version coupling.