I would like to know which are benefit using this modules instead of a packages that laravel already offer?
Thanks
This article explain why is good to have a module based architecture.
But I know the benefits.
My question is why not just use "packages" ?
I am using laravel packages right now, and I am not sure why switch to modules that this package offer.
Seem the same thing in the end.
@nWidart
@nWidart I play now with your modules last weeks, but I really don't see difference with package. I mean that I could archive the same with package. No? Which more features I get with modules that is not available with packages?
I have the same question, what is the benefit of using modules over the standard packages - https://laravel.com/docs/6.x/packages ?
If you don't see the benefit, packages are good for you.
I am a big fan of a modular architecture and currently playing around with laravel-modules.
But till now, 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.
So @nWidart why do you prefere modules over packages or in which situations? Your Blogpost is, as @kamov said, just a good explanation why you should use modular structure at all, not why your package.
Don't get me wrong, you don't have to "sell" your package to me (or us), but I just want to understand the benefit.
Personally I like to develop outside the vendor folder. 馃槢
Having my code under a proper namespace, outside of app just makes sense to me.
Yes, you are right, but thats exactly what packages do as well. If you create your package you will place it at packages/YOUR_COMPANY_NAME/PACKAGE_NAME, which isn't the vendor folder. Thats btw exactly what for example laravel-packager does:
composer.json
"caravel/grid": {
"type": "path",
"url": "/path/to/project/packages/CompanyName/PackageName"
}
You can even name the main folder "modules" if you prefer that.
composer.json
"caravel/grid": {
"type": "path",
"url": "/path/to/project/modules/CompanyName/PackageName"
}
So I still don't get it.
The initial commit of larave-modules was 8th of feb 2014
your package is 10th of june 2015.
Imo that configuration doesn't look very good.
So maybe you should ask these questions there?
Most helpful comment
@nWidart I play now with your modules last weeks, but I really don't see difference with package. I mean that I could archive the same with package. No? Which more features I get with modules that is not available with packages?