nWidart / laravel-modules

Module Management In Laravel
https://docs.laravelmodules.com
MIT License
5.5k stars 954 forks source link

Auto Registration of Module Migrations #1889

Closed alissn closed 2 months ago

alissn commented 3 months ago

Hi,

In this pull request, I have added a section to enable the auto-registration of module migrations. Additionally, a config option has been added to enable or disable this feature.

After merging this pull request, you can remove the following line from the ModuleServiceProviders (though leaving it won't cause any issues):

$this->loadMigrationsFrom(module_path($this->moduleName, 'database/migrations'));

Note: This option does not register subfolders of migrations. Subfolders should be registered manually.

This pull request also fixes #1881. Apparently, some project modules were not registering their migration paths in the service provider, even though they exist in the package's stub file.

If you need more details or have any questions, please let me know.