Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Modules Laravel Package

nwidart/laravel-modules

Laravel package for structuring large apps into self-contained modules (like mini packages) with their own controllers, models, views, routes, and config. Includes Artisan generators, module discovery, and configuration for organizing and scaling projects.

View on GitHub
Deep Wiki
Context7
11.0.10
11.0.9
11.0.8
11.0.7
11.0.6
11.0.5
11.0.4
11.0.3
11.0.2
11.0.1
11.0.0
10.0.6
10.0.5
10.0.4
10.0.3
10.0.2
10.0.1
10.0.0

Changed

  • Minimum PHP version to 8.1 for supporting Laravel 10
  • Laravel 10 version
  • Increased PHPUnit to 10.0
  • Increased Mockery to 1.5
9.0.7
9.0.6
9.0.5
9.0.4
  • 9.02 - 9.0.3 have been removed due to savere performance problems
9.0.1

Added

  • Added option to publish stubs for modules php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider" --tag="stubs"

Changed

9.0

Changed

  • Minimum PHP version to 8.0 for supporting Laravel 9
  • Laravel 9 version
  • Increased PHPUnit to 9.5
  • Increased Mockery to 1.4
  • Fixed test replaced expectsEvents with event fakes
8.3

Fixed

  • The ability to override commands via config file.
  • Incorrectly placed config key
  • Class name when special characters are used in the rule name
  • Fix error on anonymous migration

Changed

  • Changed View/Component to View/Components
  • Updated test snapshots for the MakeCommand test snapshots
  • Command stub signature from signature to name
  • Revert PR1171 which causes tests to fail

Added

  • Added commands make class component and make view component
  • Test against php 8.0
  • Merge config in register method
  • Added optional controller flag to model generator command
  • Set module for make-controller command
  • Added tests for generating controller in model generator command
  • Added test for check if migration and controller flag are both present
  • Laravel mix v6 support
8.2

Added

  • New module:make-component command to generate laravel components

Fixed

  • Fixed bug: Target class [Nwidart\Modules\Commands\] does not exist.
8.1

Added

  • Command management via configuration file
  • Laravel 8 Factories compatibility
  • New improved way to define controller types. --web, --api and --plain options.
  • New configuration option to make compose run in silent mode

Changed

  • New generated commands now use the $signature property instead of $name
  • Fixed issue where order was used instead of priority
8.0

Added

  • Laravel 8 support

Updated

  • Update ListenerMakeCommand to properly use the --events option
7.2.0

Added

  • Added return statements in artisan commands. Helpful to validate if something was successfully ran. (#1026)

Changed

  • Update JsonResource namespace, using the new Illuminate\Http\Resources\Json\JsonResource. (#969)
  • Enable command returns the status code (#978)
  • Removing module service provider from composer.json stub (#996)
  • Fixed custom stub path issue. Replacing a hardcoded stub path. (#1016)
  • Controller return type changed to Illuminate\Contracts\Support\Renderable. (#1020)
  • Change bigIncrements method to id (#1029)
  • Adding force option for module:seed (#1030)
7.1.0

Changed

  • php artsian module:enable (without any arguments) will enable all modules
  • php artsian module:disable (without any arguments) will disable all modules
  • Updating Laravel Mix version as well as cross-env.
7.0.0

Added

  • Laravel 7.0 support
6.2.0

Changed

  • Properly guessing the namespace from the path (in GeneratorPath class)
  • Fixing generation of resource file if the resource has been disabled to generate
  • Fix when using a custom service provider namespace, namespace is correctly referenced in module.json and compose.json
  • Fix when using custom service provider namespace, module path is correctly referenced in the RouteServiceProvider and ModuleServiceProvider
  • Fix when using a custom path for controllers in the controller stub
6.1.0

Added

  • Added new module:delete command

Changed

  • Add optional path parameter to module_path helper (PR#861)
  • The default path of the module_statuses.json file has been moved to the Application's base path. This is to improve its visibility and the fact that it can be committed by default.
  • Throw an exception when no proper activator class was configured
6.0.0

Added

  • New File Activator feature. PR #790 from @ryssbowh

    This feature changes how modules are activated and de-activated. Currently module statuses are stored on disk, this features adds the possibility of storing this status information in a database.

    Use the command php artisan module:v6:migrate to have old modules active status migrated to the new system.

Changed

  • Alternate way to define the namespace of modules in PR #776 by @daison12006013

    This allows to have the content of the module under an src/ folder for example.

  • BREAKING New way to handle active and inactive modules.

    Modules don't store their active status in their module.json file anymore, but in a file under the storage folder. Run php artisan module:v6:migrate to use the new system.

  • BREAKING Renamed method enabled to isEnabled in \Nwidart\Modules\Module.

  • BREAKING Renamed method disabled to isDisabled in \Nwidart\Modules\Module.

  • BREAKING Renamed method enabled to isEnabled in \Nwidart\Modules\FileRepository.

  • BREAKING Renamed method disabled to isDisabled in \Nwidart\Modules\FileRepository.

  • BREAKING Removed the __get magic method on the \Nwidart\Modules\Module class. Use get() or json()->get() instead.

  • The module:make-listener command now correctly uses the namespace configuration

  • The generated Factories now has type hints for the \Illuminate\Database\Eloquent\Factory class

  • Improved foreign key constraint generation

  • Exception handling in the SeedCommand has been improved

5.0.1

Added

  • artisan module:route-provider has a --force option to overwrite existing file

Changed

  • Fixing the RouteServiceProvider generation to properly use the routes/web and routes/api stubs
  • Replacing [@stop](https://github.com/stop) with [@endsection](https://github.com/endsection) in the view stub file
  • Module class does not extend Laravel's Service Provider class anymore
5.0.0

Added

  • Laravel 5.8 support

Changed

  • Deprecated string and array methods have been replaced
  • Fixed caching not being cleared after disabling and enabling modules
  • Update Route Provider stub to not affect the root namespace of the URL generator (#727)

Removed

  • PHP 7.1 support
4.1.0

Changed

  • Updated to laravel mix 4
  • Add --api argument to module:make-controller command
  • Seeding modules outside out Modules namespace
4.0.0

Added

  • New way of handling routes by default using a RouteServiceProvider (instead of start.php)
  • Laravel 5.7 support

Changed

  • Allow class resolution on short name and abstract
  • module:seed accepts a --class option
3.3.1

Changed

  • Added the ability to set a sub-namespace to controllers module:make-controller Api\\TestController
3.3.0

Changed

  • module:update command has now the possibility to update all modules at once
  • Fixing commented code for Laravel Mix
3.2.0

Added

  • Added possibility to update all modules at once if any not specified (PR #523)

Changed

  • Mix: Fix css relative urls by changing the route folder (PR #521)
  • Mix: Prevents every build from deleting previous Mix config file (PR #521)
3.1.0

Added

Changed

  • Allow symlinks in module path
  • Returns the parameter --class to the SeedCommand.
  • Generate folders recursively
  • Removing link that has become a 404
  • Fixed seed command exception typehint

Removed

  • Removed the optimize command on the module:make-migration command
3.0.1

Changed

  • Update publish commands to use the new API to get all enabled modules (PR #483 )
3.0.0
2.7.0
2.6.0
2.5.1
2.5.0
2.4.1
2.4.0
2.3.0
2.2.1
2.2.0

Added

  • Lumen compatibility with new way to register providers
2.1.0

Changed

  • Register module migrations
  • Fixed issue with module:migrate-refresh command
  • Improved module loading of their service providers. Using laravel caching system. Allowing usage of deferred providers.
  • Fixed path to module factories
2.0.0

Added

  • Support Laravel 5.5
1.27.2

Changed

  • Allow migrate-refresh command to be run without module argument
  • Module name was added to the module enable and disable events
1.27.1

Changed

  • Only run composer require on the module:update command if there's something to require
  • Fixing lumen support
1.27.0

Added

  • Laravel Lumen support

Changed

  • Update dev dependencies grumphp and phpcsfixer to latest versions
  • The make:model command with the -m flag to create the associated migration is now using a current migration file name
1.26.0

Changed

  • Throw an exception if asset name structure was not correct when using {!! Module::asset() !!}
  • Create the module used file if non existent. Will provide for a better error message if module is omitted in console commands without a module:use.
1.25.1

Changed

  • More flexibility to the json() method, while keeping the performance improvements.
1.25.0

Changed

  • Improving performance by only instantiating Json class for the module.json file once
  • Added support for generic git hosts
1.24.0

Changed

  • Using resource_path to register module views
  • Changed the method to load additional eloquent factory paths
1.23.0
1.22.0

Changed

  • Fixed the --plain on the make:module command, to not include a service provider in the module.json file as it's not generated.
  • Add command description to the GenerateNotificationCommand.
1.21.0

Added

  • Added the Macroable trait to the Module class.

Changed

  • The collections method now accepts an optional parameter to get modules by status, in a laravel collection.
  • Allow laravel 5.5.* to be used.
1.20.0

Changed

  • module:update: Copy over the scripts key to main composer.json file
  • Add a --subpath option to migrate command
  • module:update: Install / require all require & require-dev package at once, instead of multiple calls to composer require.
  • module:publish-config command now uses the namespace set up in the configuration file.
1.19.0

Changed

  • module:update command now also takes the require-dev key into account
  • Making the $migrations parameter optional on getLastBatchNumber()
1.18.0

Changed

  • The module list command (module:list) now returns the native module name
1.17.1

Changed

  • Fixed issues with route file location in start.php
1.17.0

Changed

  • Add checking for failure to parse module JSON
1.16.0

Added

  • Support for Laravel 5.4
  • Adding show method on resource controller
  • Added check for cached routes to not load them multiple times
1.15.0

Added

  • Module requirements (PR #117)
  • Added Macroable trait to Module class (PR #116)

Changed

  • Added missing import of the Schema facade on migration stubs
  • A default plain migration will be used if the name was not matched against a predefined structure (create, add, delete and drop)
  • Add tests for all the different migration structures above
  • Fix: respecting order in reverse migrations (PR #98)
  • Fix: module:reset and module:migrate-rollback didn't have --database option (PR #88)
  • Fix: Module::asset(), removed obsolete backslash. (PR #91)
1.14.0

Added

  • module:make-notification command to generate a notification class

Changed

  • Usage of the lists() method on the laravel collection has been removed in favor of pluck()
  • Modules can now overwrite the default migration and seed paths in the module.json file
0.13.1

Changed

  • Generated emails are now generated in the Emails folder by default
0.13.0

Changed

  • Ability to set default value on the config() method of a module.
  • Mail: Setting default value to config. Using that as the namespace.
  • Using PSR2 for generated stubs
0.12.0

Added

  • Generation of Mailable classes
0.11.2

Changed

  • Using stable version of laravelcollective/html (5.3)
0.11.1

Changed

  • Using stable development of laravelcollective/html
0.11

Added

  • Adding module:make-job command to generate a job class
  • Adding support for Laravel 5.3

Changed

  • Added force option to module:seed command
0.10

Added

  • Experimental Laravel 5.3 support

Changed

  • Make sure the class name has Controller appended to it as well. Previously only the file had it suffixed.

Removed

  • Dependencies: pingpong/support and pingpong/generators
0.9

Added

  • Adding a plain option to the generate controller command

Changed

  • Generate controller command now generates all resource methods
0.8

Fixed

  • Module generation namespace now works with StudlyCase (Issue #14)
  • No module namespace fix (#13)

Changed

  • Using new service provider stub for module generation too
0.1

Initial release

Updated
Removed
  • Dropped php 7.0 support
  • BC: Module class: Deprecated active() method, use enabled()
  • BC: Module class: Deprecated notActive() method, use disabled()
  • BC: Repository class: Deprecated addPath() method, use addLocation()
  • BC: Repository class: Deprecated get() method, use find()
  • BC: Repository class: Deprecated getUsed() method, use getUsedNow()
Next
Fixed
Changes
Changed
  • Fixed class namespace to Repository in ContractsServiceProvider
Added
  • A --migration flag to the module:make-model command to generate the migration file with a model
  • Factories are now also defined in the master service providers. This is used in the module:make command without the --plain flag, or using module:make-provider with the --master flag.
  • module_path() helper function.

Changed

  • The default location of event listeners is now in Listeners/, from Events/Handlers
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport