Modules
Modules are the building blocks of Leaf. They are independent pieces of Leaf's functionality available for use in your app. They are designed to be simple, easy to use, framework-agnostic, and can be used in any PHP project with nearly zero configuration.
Installing Modules
Modules are just like regular PHP packages. You can install them using Composer. To install a module, run:
composer require leafs/<module>
If you're using Leaf CLI, you can install a module without the leafs/
prefix:
leaf install <module>
Using Modules
Most modules integrate directly into Leaf, so you can use them with Leaf's functional mode. This gives you a little more performance and flexibility. The documentation for each module covers everything you need to know about using the module.
List of Modules
We update this list regularly. If you have a module you'd like to see here, feel free to open an issue or create a pull request on our documentation repository. Community created modules are welcome here too ❤️
Project | Status | Description |
---|---|---|
alchemy | Setup testing/linting for your PHP apps | |
aloe | Smart console helper for Leaf MVC | |
anchor | Built-in protection for your Leaf apps | |
auth | Simple but powerful authentication system for your apps | |
bareui | Dead simple templating engine with no compilation | |
blade | Laravel blade port for leaf | |
cookie | Cookie management for your PHP apps | |
cors | CORS operations made simple | |
csrf | CSRF protection for your Leaf apps | |
date | Dead simple PHP dates | |
db | Lightweight query builder for your PHP apps | |
devtools | Developer tools for Leaf PHP | |
eien | High-speed, high-performance server for leaf | |
exception | Leaf's exception wrapper (fork of whoops) | |
fetch | HTTP requests made simple | |
form | Form processes and validation | |
fs | Awesome filesystem operations + file uploads | |
http | Http operations made simple (request, response, ...) | |
inertia | Leaf adapter for inertia JS | |
logger | leaf logger module | |
Mailing made easy with leaf | ||
mvc-core | Brain of Leaf MVC | |
password | Password encryption/validation/hashing in one box | |
redis | Functionality for Redis | |
router | Leaf Router copy for use outside of Leaf | |
session | PHP sessions made simple | |
vite | Leaf server component for Vite |
Community Modules
This is a list of modules created by the Leaf community. These modules are not officially maintained by the Leaf team, but they are welcome here. If you have a module you'd like to see here, feel free to open an issue or create a pull request on our documentation repository.
Project | Status | Description |
---|---|---|
devcycle/devcycle-leaf-plugin | Devcycle Leaf Module |