What is difference between Laravel Modules and Package

Viewed 1562

I am working on enterprise application and i want to separate each functionality in modules and build a modular based application. But here i am confused between the package and the modules it both seems the same. a package can be used again in any application and the module too. so what is the difference. like nwidart/laravel-modules is there to build a modular based application and the i can also create packages so i can use them too later. even modules can be used later in any other applcation.

1 Answers

the only benefit I see is great the command line tool for creating a module, compared to package creation by hand, but this could be also done for packages (for example https://github.com/Jeroen-G/laravel-packager). On the other hand, packages can be easier namespaced and placed in subdirectories or grouped in categories and are the "standard" of laravel supported by the team and most of the packages.

For both approaches you can see these links for Packages for modules

Related