Modules are a new feature added in Leaf 3 which basically takes parts of Leaf and separates them into installable chunks which can be used both inside and outside of Leaf.
Modules are framework/library agnostic, which means that they'll work just about everywhere with zero config just as with Leaf itself.
Modules can be quickly installed through composer or the leaf CLI with a single command.
The biggest question people ask with Leaf 3 is why we decided to switch to modules, stripping leaf of almost all it's code.
@mychidarko put an article together on why we decided to switch to modules instead of maintaining the whole code together. We also have a GitHub discussion introducing leaf 3 and everything you need to know about it, we explain modules further here.
Modules are always published on composer and can be installed through composer CLI or the leaf CLI.
composer require leafs/<module-name>
leaf install <module-name>
List of available modules
This list is still being updated, you can keep checking for updates.
|router||Router module for leaf PHP|
|anchor||Basic security tools|
|csrf||CSRF plugin for leaf anchor|
|experiments||collection of experimental modules|
|Mailing made easy with leaf|
|auth||Simple but powerful authentication system for your apps|
|form||Form processes and validation|
|password||Password encryption/validation/hashing in one box|
|db-old||Leaf Db from v1 (still maintained)|
|db||Leaf Db from v2 (actively maintained)|
|session||PHP sessions made simple|
|cookie||Cookie management without the tears|
|fs||Awesome filesystem operations + file uploads|
|date||PHP dates for humans|
|bareui||Dead simple templating engine with no compilation (blazing speed)|
|blade||Laravel blade templating port for leaf|
|veins||Leaf veins templating engine|
|http||Http operations made simple (request, response, ...)|
|mvc-core||Core MVC tools powering our MVC wrappers|
|aloe||Overpowered cli for our MVC wrappers|
|fetch||HTTP requests made simple|
|logger||Easy logger module|